Exception: Granite::Action::ValidationError

Inherits:
Error
  • Object
show all
Defined in:
lib/granite/action.rb

Instance Method Summary collapse

Constructor Details

#initialize(action) ⇒ ValidationError

Returns a new instance of ValidationError.



20
21
22
23
# File 'lib/granite/action.rb', line 20

def initialize(action)
  errors = action.errors.full_messages.join(', ')
  super(I18n.t(:"#{action.class.i18n_scope}.errors.messages.action_invalid", action: action.class, errors: errors, default: :'errors.messages.action_invalid'), action)
end