diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fac406ee..e53cecd0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,7 +1,6 @@ class ApplicationController < ActionController::Base - extend TravelSupportProgram::ForceSsl - force_ssl_if_available + force_ssl :unless => Proc.new { Rails.env.test? || Rails.env.development? } before_filter :authenticate_and_audit_user, :unless => :devise_controller? load_and_authorize_resource :unless => :devise_controller? before_filter :configure_permitted_parameters, if: :devise_controller? diff --git a/app/controllers/user_profiles_controller.rb b/app/controllers/user_profiles_controller.rb index 08854a55..ac3bb978 100644 --- a/app/controllers/user_profiles_controller.rb +++ b/app/controllers/user_profiles_controller.rb @@ -1,5 +1,5 @@ class UserProfilesController < ApplicationController - force_ssl_if_available + force_ssl :unless => Proc.new { Rails.env.test? || Rails.env.development? } before_filter :set_user_and_profile before_filter :remove_role_from_params, :only => [:update, :update_password] diff --git a/lib/travel_support_program/force_ssl.rb b/lib/travel_support_program/force_ssl.rb deleted file mode 100644 index 978f1bf3..00000000 --- a/lib/travel_support_program/force_ssl.rb +++ /dev/null @@ -1,9 +0,0 @@ -# -# Module for application-wide code -# -module TravelSupportProgram::ForceSsl - # Before filter for redirecting to the SSL-enabled version of the url - def force_ssl_if_available(args = {}) - force_ssl(*args) unless Rails.env.test? || Rails.env.development? - end -end