remove sections ok

This commit is contained in:
2022-12-02 19:09:58 +02:00
parent 2eaa344ed0
commit 3d61e44e09
5 changed files with 25 additions and 4 deletions

View File

@ -23,6 +23,13 @@ module Merged
redirect_to section_select_template_url(new_section.id)
end
def remove
page = @section.page
page.remove_section( @section )
page.save
redirect_to page_sections_url(page.name)
end
def set_image
@section.content["image"] = params[:image]
@section.save