Class: YAAF::Form

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, ActiveModel::Validations::Callbacks, ActiveRecord::Transactions
Defined in:
lib/yaaf/form.rb

Overview

Parent class for form objects

Instance Method Summary collapse

Instance Method Details

#save(options = {}) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/yaaf/form.rb', line 15

def save(options = {})
  save_form(options)
rescue ActiveRecord::RecordInvalid,
       ActiveRecord::RecordNotSaved,
       ActiveModel::ValidationError

  false
end

#save!(options = {}) ⇒ Object



24
25
26
# File 'lib/yaaf/form.rb', line 24

def save!(options = {})
  save_form(options)
end