Module: ActionController::StrongParameters

Extended by:
ActiveSupport::Concern
Includes:
ActiveSupport::Rescuable
Included in:
ActionController
Defined in:
lib/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#paramsObject

Returns a new ActionController::Parameters object that has been instantiated with the request.parameters.



10
11
12
# File 'lib/action_controller.rb', line 10

def params
  @_params ||= Parameters.new(request.parameters)
end

#params=(value) ⇒ Object

Assigns the given value to the params hash. If value is a Hash, this will create an ActionController::Parameters object that has been instantiated with the given value hash.



17
18
19
# File 'lib/action_controller.rb', line 17

def params=(value)
  @_params = value.is_a?(Hash) ? Parameters.new(value) : value
end