Exception: ActionController::ParameterMissing
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
KeyError
|
|
Instance Chain:
self,
DidYouMean::Correctable,
KeyError
|
|
Inherits: |
KeyError
|
Defined in: | actionpack/lib/action_controller/metal/strong_parameters.rb |
Overview
Raised when a required parameter is missing.
params = ActionController::Parameters.new(a: {})
params.fetch(:b)
# => ActionController::ParameterMissing: param is missing or the value is empty or invalid: b
params.require(:a)
# => ActionController::ParameterMissing: param is missing or the value is empty or invalid: a
params.expect(a: [])
# => ActionController::ParameterMissing: param is missing or the value is empty or invalid: a
Class Method Summary
- .new(param, keys = nil) ⇒ ParameterMissing constructor Internal use only
Instance Attribute Summary
Instance Method Summary
- #corrections Internal use only
Constructor Details
.new(param, keys = nil) ⇒ ParameterMissing
This method is for internal use only.
Instance Attribute Details
#keys (readonly)
This method is for internal use only.
[ GitHub ]
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 26
attr_reader :param, :keys # :nodoc:
#param (readonly)
This method is for internal use only.
[ GitHub ]
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 26
attr_reader :param, :keys # :nodoc:
Instance Method Details
#corrections
This method is for internal use only.
[ GitHub ]