Module: ActiveModel::FormObject::InstanceMethods

Defined in:
lib/active_model/form_object.rb

Instance Method Summary collapse

Instance Method Details

#initialize(*args) ⇒ Object



56
57
# File 'lib/active_model/form_object.rb', line 56

def initialize(*args)
end

#persisted?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/active_model/form_object.rb', line 59

def persisted?
  false
end

#saveObject



63
64
65
66
67
68
69
70
# File 'lib/active_model/form_object.rb', line 63

def save
  if valid?
    persist!
    true
  else
    false
  end
end