Exception: Granite::Form::NormalizerMissing

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/granite/form/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NormalizerMissing

Returns a new instance of NormalizerMissing.



57
58
59
60
61
62
63
64
65
66
# File 'lib/granite/form/errors.rb', line 57

def initialize(name)
  super(<<~MESSAGE)
    Could not find normalizer `:#{name}`
    You can define it with:

      Granite::Form.normalizer(:#{name}) do |value, options|
        # do some staff with value and options
      end
  MESSAGE
end