Class: ActionController::UrlRewriter

Inherits:
Object
  • Object
show all
Defined in:
lib/url_rewriter.rb

Instance Method Summary collapse

Instance Method Details

#rewrite_with_secure_option(options = {}) ⇒ Object

Add a secure option to the rewrite method.



7
8
9
10
11
# File 'lib/url_rewriter.rb', line 7

def rewrite_with_secure_option(options = {})
  secure = options.delete(:secure)
  options.merge!(:only_path => false, :protocol => secure ? 'https' : 'http') unless SslRequirement.disable_ssl_check?
  rewrite_without_secure_option options
end