Module: ParamsKeeper::Controller

Extended by:
ActiveSupport::Concern
Defined in:
lib/params_keeper/controller.rb

Instance Method Summary collapse

Instance Method Details

#redirect_to(options = {}, response_options = {}) ⇒ Object



16
17
18
19
20
21
# File 'lib/params_keeper/controller.rb', line 16

def redirect_to(options = {}, response_options = {})
  return super unless options.is_a?(String)

  url = ParamsKeeper::UrlFor.new(self, self, options).call
  url ? super(url, response_options) : super
end

#url_for(options = nil) ⇒ Object



12
13
14
# File 'lib/params_keeper/controller.rb', line 12

def url_for(options = nil)
  ParamsKeeper::UrlFor.new(self, self, options).call || super
end