Exception: StrongerParameters::InvalidParameter

Inherits:
StandardError
  • Object
show all
Defined in:
lib/stronger_parameters/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(invalid_value, key) ⇒ InvalidParameter

Returns a new instance of InvalidParameter.



14
15
16
17
18
# File 'lib/stronger_parameters/errors.rb', line 14

def initialize(invalid_value, key)
  @value = invalid_value.value
  @key = key
  super(invalid_value.message)
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



12
13
14
# File 'lib/stronger_parameters/errors.rb', line 12

def key
  @key
end

#valueObject

Returns the value of attribute value.



12
13
14
# File 'lib/stronger_parameters/errors.rb', line 12

def value
  @value
end