diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9c3009f..6d1397c 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,6 +1,12 @@ class ApplicationController < ActionController::Base protect_from_forgery + force_ssl if: :ssl_configured? + + def ssl_configured? + !Rails.env.development? && !Rails.env.test? + end + rescue_from CanCan::AccessDenied do |exception| if !current_user.nil? && current_user.orientation.blank? then flash[:alert] = "Sorry, you probably need to complete New Member Orientation before having access to this page.
Please check your email and schedule a New Member Orientation with a volunteer."