Sha256: 2ebc5755cb87b63081e1582790e37b7bf79a236032210fd1e1d7e454d26d9800
Contents?: true
Size: 694 Bytes
Versions: 19
Compression:
Stored size: 694 Bytes
Contents
module Adminpanel class SectionsController < Adminpanel::ApplicationController def index @sections = Section.all end def edit @section = Section.find(params[:id]) end def update @section = Section.find(params[:id]) if @section.update(section_params) redirect_to section_path(@section), notice: 'La seccion se ha actualizado' else render 'edit' end end private def section_params params.require(:section).permit( :has_description, :description, :key, :page, :name, :max_files, :has_image, sectionfile_ids: [] ) end end end
Version data entries
19 entries across 19 versions & 1 rubygems