Class: Lcms::Engine::CurriculumForm
- Inherits:
-
Object
- Object
- Lcms::Engine::CurriculumForm
- Includes:
- ActiveModel::Model
- Defined in:
- app/forms/lcms/engine/curriculum_form.rb
Overview
Handle the form data from the CurriculumEditor admin component
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ CurriculumForm
constructor
A new instance of CurriculumForm.
- #save ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ CurriculumForm
Returns a new instance of CurriculumForm.
12 13 14 15 |
# File 'app/forms/lcms/engine/curriculum_form.rb', line 12 def initialize(params = {}) parsed_change_log = parse_change_log params super params.merge(change_log: parsed_change_log) end |
Instance Method Details
#save ⇒ Object
17 18 19 20 21 22 |
# File 'app/forms/lcms/engine/curriculum_form.rb', line 17 def save return false unless valid? persist! errors.empty? end |