Exception: StrongerParameters::InvalidParameter
- Inherits:
-
StandardError
- Object
- StandardError
- StrongerParameters::InvalidParameter
- Defined in:
- lib/stronger_parameters/errors.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
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.
15 16 17 18 19 |
# File 'lib/stronger_parameters/errors.rb', line 15 def initialize(invalid_value, key) @value = invalid_value.value @key = key super("Invalid parameter: #{@key} #{invalid_value.}") end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
13 14 15 |
# File 'lib/stronger_parameters/errors.rb', line 13 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
13 14 15 |
# File 'lib/stronger_parameters/errors.rb', line 13 def value @value end |