Class: Locomotive::PageContentController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Locomotive::PageContentController
- Defined in:
- app/controllers/locomotive/page_content_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/locomotive/page_content_controller.rb', line 17 def edit @page @section_definitions = current_site.sections.pluck(:slug, :definition).map { |document| { 'type' => document[0] }.merge(document[1]) } @editable_content = parsing_service.find_all_elements(@page) @sections = @editable_content[:sections] @editable_elements = @editable_content[:elements] end |
#update ⇒ Object
28 29 30 31 32 |
# File 'app/controllers/locomotive/page_content_controller.rb', line 28 def update @page persisting_service.save(site_params, page_params) end |