Class: MegaBar::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- MegaBar::ApplicationController
- Defined in:
- app/controllers/mega_bar/application_controller.rb
Direct Known Subclasses
BlocksController, CheckboxesController, FieldDisplaysController, FieldsController, LayablesController, LayoutSectionsController, LayoutsController, MegaDashesController, ModelDisplayCollectionsController, ModelDisplayFormatsController, ModelDisplaysController, ModelsController, OptionsController, PagesController, PortfoliosController, RadiosController, RecordsFormatsController, SelectsController, SiteJoinsController, SitesController, TemplateSectionsController, TemplatesController, TextareasController, TextboxesController, TextreadsController, ThemeJoinsController, ThemesController
Instance Method Summary collapse
Instance Method Details
#_params ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/mega_bar/application_controller.rb', line 11 def _params permits = [] MegaBar::Field.by_model(env[:mega_env][:modle_id]).order('data_type desc').each do |att| case att.data_type when 'array' permits << { att.field => [] } else permits << att.field unless ['id', 'created_at', 'updated_at'].include?(att) end end params.require(controller_name.singularize).permit(permits) end |