Class: ActionController::Base

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

Class Method Summary collapse

Class Method Details

.persists_params(**options) {|persistent_params_config| ... } ⇒ Object

Yields:

  • (persistent_params_config)


75
76
77
78
79
# File 'lib/persistent_params.rb', line 75

def self.persists_params(**options)
  include PersistentParams
  persistent_params_config(options)
  yield persistent_params_config if block_given?
end

.persists_scopes(**options, &block) ⇒ Object



81
82
83
# File 'lib/persistent_params.rb', line 81

def self.persists_scopes(**options, &block)
  persists_params(params_method: :current_scopes, **options, &block)
end