Module: ActionController::ForceSSL::ClassMethods
- Defined in:
- lib/nimbleshop/core_ext/force_ssl.rb
Instance Method Summary collapse
Instance Method Details
#force_ssl(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/nimbleshop/core_ext/force_ssl.rb', line 13 def force_ssl( = {}) host = .delete :host before_filter() do if !request.ssl?# && !Rails.env.development? = {protocol: 'https://', status: :moved_permanently} .merge! host: host if host .merge! params: request.query_parameters redirect_to end end end |