Sha256: 67cf4423f6ced2ff505fa680df5493c66fda061312c4e7c4d84d8e97d7bb5e35
Contents?: true
Size: 441 Bytes
Versions: 3
Compression:
Stored size: 441 Bytes
Contents
class Cambium::Admin::PagesController < Cambium::AdminController private def create_params obj = admin_model.to_s.gsub(/Cambium::/, '').tableize.singularize.to_sym p = params.require(obj).permit(admin_form.fields.to_h.keys) if params[:page][:template_data].present? data = @object.template_data.merge(params[:page][:template_data]) p = p.merge(:template_data => data) end p end end
Version data entries
3 entries across 3 versions & 1 rubygems