Class: Facio::Context

Inherits:
BaseModel show all
Defined in:
lib/facio/context.rb

Instance Method Summary collapse

Instance Method Details

#fail!(attr = nil, message = :invalid, options = {}) ⇒ Object



5
6
7
8
9
# File 'lib/facio/context.rb', line 5

def fail!(attr = nil, message = :invalid, options = {})
  @success = false
  merge_errors!(attr, message, options)
  raise Facio::ContextFailure, self
end