Exception: Granite::Action::ValidationError
- Defined in:
- lib/granite/action.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(action) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(action) ⇒ ValidationError
Returns a new instance of ValidationError.
22 23 24 25 26 27 28 |
# File 'lib/granite/action.rb', line 22 def initialize(action) errors = action.errors..join(', ') super(I18n.t(:"#{action.class.i18n_scope}.errors.messages.action_invalid", action: action.class, errors: errors, default: :'errors.messages.action_invalid'), action) end |