actionpack/lib/action_controller/metal/force_ssl.rb
# Redirect the existing request to use the HTTPS protocol.
#
# ==== Parameters
# * <tt>host</tt> - Redirect to a different host name
Redirect the existing request to use the HTTPS protocol.
Parameters
host - Redirect to a different host name
Redirect the existing request to use the HTTPS protocol . Parameters host - Redirect to a different host name
def force_ssl_redirect(host = nil)
      unless request.ssl?
        redirect_options = {:protocol => 'https://', :status => :moved_permanently}
        redirect_options.merge!(:host => host) if host
        redirect_options.merge!(:params => request.query_parameters)
        flash.keep if respond_to?(:flash)
        redirect_to redirect_options
      end
    end
def force_ssl_redirect ( host = nil ) unless request . ssl? redirect_options = { :protocol => 'https://' , :status => :moved_permanently } redirect_options . merge! ( :host => host ) if host redirect_options . merge! ( :params => request . query_parameters ) flash . keep if respond_to? ( :flash ) redirect_to redirect_options end end
Redirect the existing request to use the HTTPS protocol.
Redirect the existing request to use the HTTPS protocol .
host