first actual edit (header)

This commit is contained in:
2022-11-27 17:23:38 +02:00
parent 8d405e44e1
commit 6bb0b35d3f
4 changed files with 35 additions and 6 deletions

View File

@ -2,6 +2,17 @@ module Cms
class SectionsController < CmsController
before_action :set_page, only: %i[ show edit update destroy ]
def update
@section.content.each do |key , value|
next if key == "id"
if(!params[key].nil?)
@section.update(key, params[key])
puts "updating:#{key}=#{params[key]}"
end
end
@page.save
redirect_to :cms_page_section
end
private
def set_page