app/controllers/admin/entities_controller.rb
# Only allow a list of trusted parameters through.
Only allow a list of trusted parameters through.
Only allow a list of trusted parameters through .
def permitted_entity_params
      template = @template.slug.to_sym
      fields = @template.dynamic_attributes
      params.require(template).permit(:slug, :published, :publish, data: {})
    end
def permitted_entity_params template = @template . slug . to_sym fields = @template . dynamic_attributes params . require ( template ) . permit ( :slug , :published , :publish , data : { } ) end
Only allow a list of trusted parameters through.
Only allow a list of trusted parameters through .
# params.require(template).permit(*fields, :slug, :published, :publish)