Exception: StrongerParameters::InvalidParameter
- Inherits:
-
StandardError
- Object
- StandardError
- StrongerParameters::InvalidParameter
- Defined in:
- lib/stronger_parameters/errors.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(invalid_value, key) ⇒ InvalidParameter
constructor
A new instance of InvalidParameter.
Constructor Details
#initialize(invalid_value, key) ⇒ InvalidParameter
Returns a new instance of InvalidParameter.
16 17 18 19 20 |
# File 'lib/stronger_parameters/errors.rb', line 16 def initialize(invalid_value, key) @value = invalid_value.value @key = key super("Invalid parameter: #{@key} #{invalid_value.}") end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
14 15 16 |
# File 'lib/stronger_parameters/errors.rb', line 14 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
14 15 16 |
# File 'lib/stronger_parameters/errors.rb', line 14 def value @value end |