Class: SeaFood::Form
- Inherits:
-
Object
- Object
- SeaFood::Form
- Includes:
- ActiveModel::Model
- Defined in:
- lib/sea_food/form.rb
Instance Method Summary collapse
Instance Method Details
#save(options = {}) ⇒ Object
9 10 11 |
# File 'lib/sea_food/form.rb', line 9 def save( = {}) model.save(**) if valid? end |
#save!(options = {}) ⇒ Object
13 14 15 |
# File 'lib/sea_food/form.rb', line 13 def save!( = {}) model.save!(**) if valid? end |
#validate(options = {}) ⇒ Object
5 6 7 |
# File 'lib/sea_food/form.rb', line 5 def validate( = {}) valid? && validate_model() end |