module ParamsKeeper::Controller

Public Instance Methods

clear_keep_params!() click to toggle source
# File lib/params_keeper/controller.rb, line 28
 def clear_keep_params!
   self.keep_params_configs = nil
end
keep_params(*args) click to toggle source
# File lib/params_keeper/controller.rb, line 22
def keep_params(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  config = ParamsKeeper::Config.new(args, options)
  self.keep_params_configs = keep_params_configs.to_a + [config]
end
redirect_to(options = {}, response_options = {}) click to toggle source
Calls superclass method
# File lib/params_keeper/controller.rb, line 14
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) click to toggle source
Calls superclass method
# File lib/params_keeper/controller.rb, line 10
def url_for(options = nil)
  ParamsKeeper::UrlFor.new(self, self, options).call || super
end