Class: Maglev::Content::UpdateSectionBlockService
- Inherits:
-
Object
- Object
- Maglev::Content::UpdateSectionBlockService
- Includes:
- Injectable, HelpersConcern
- Defined in:
- app/services/maglev/content/update_section_block_service.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/services/maglev/content/update_section_block_service.rb', line 18 def call raise Maglev::Errors::UnknownSection unless section_definition raise Maglev::Errors::UnknownBlock unless block_definition ActiveRecord::Base.transaction do if site_scoped? update_section_block_content!(site) else update_section_block_content!(page) end end end |