Create part and save pages when layout is edited
This commit is contained in:
parent
c27141ff5a
commit
b049e16634
|
@ -27,6 +27,11 @@ class Page < Item
|
|||
before_save :create_parts, if: Proc.new { |page| page.new_record? || page.design_id_changed? }
|
||||
before_save :delete_empty_frontend_field, :generate_html
|
||||
|
||||
def generate_parts
|
||||
create_parts
|
||||
self.save
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def create_parts
|
||||
|
|
Loading…
Reference in New Issue