Exception: Granite::Form::TypecasterMissing
- Inherits:
-
NoMethodError
- Object
- NoMethodError
- Granite::Form::TypecasterMissing
- Defined in:
- lib/granite/form/errors.rb
Instance Method Summary collapse
-
#initialize(*classes) ⇒ TypecasterMissing
constructor
A new instance of TypecasterMissing.
Constructor Details
#initialize(*classes) ⇒ TypecasterMissing
Returns a new instance of TypecasterMissing.
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/granite/form/errors.rb', line 68 def initialize(*classes) classes = classes.flatten super <<-MESSAGE Could not find typecaster for #{classes} You can define it with: Granite::Form.typecaster('#{classes.first}') do |value| # do some staff with value and options end MESSAGE end |