Class: RailsAdmin::MainController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- RailsAdmin::MainController
- Includes:
- ActionView::Helpers::TextHelper, ApplicationHelper, MainHelper
- Defined in:
- app/controllers/rails_admin/main_controller.rb
Instance Attribute Summary
Attributes inherited from ApplicationController
#abstract_model, #model_config, #object
Instance Method Summary collapse
- #bulk_action ⇒ Object
- #list_entries(model_config = @model_config, auth_scope_key = :index, additional_scope = get_association_scope_from_params, pagination = !(params[:associated_collection] || params[:all] || params[:bulk_ids]))) ⇒ Object
Methods included from ApplicationHelper
#action, #actions, #authorized?, #breadcrumb, #bulk_menu, #current_action?, #edit_user_link, #logout_path, #main_navigation, #menu_for, #navigation, #static_navigation, #wording_for
Methods included from I18nSupport
#abbr_day_names, #abbr_month_names, #date_format, #day_names, #month_names
Methods included from MainHelper
#get_column_sets, #get_indicator, #rails_admin_form_for
Methods inherited from ApplicationController
#get_model, #get_object, #to_model_name
Instance Method Details
#bulk_action ⇒ Object
28 29 30 |
# File 'app/controllers/rails_admin/main_controller.rb', line 28 def bulk_action self.send(params[:bulk_action]) if params[:bulk_action].in?(RailsAdmin::Config::Actions.all(:controller => self, :abstract_model => @abstract_model).select(&:bulkable?).map(&:route_fragment)) end |
#list_entries(model_config = @model_config, auth_scope_key = :index, additional_scope = get_association_scope_from_params, pagination = !(params[:associated_collection] || params[:all] || params[:bulk_ids]))) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'app/controllers/rails_admin/main_controller.rb', line 32 def list_entries(model_config = @model_config, auth_scope_key = :index, additional_scope = get_association_scope_from_params, pagination = !(params[:associated_collection] || params[:all] || params[:bulk_ids])) scope = model_config.abstract_model.scoped if auth_scope = @authorization_adapter && @authorization_adapter.query(auth_scope_key, model_config.abstract_model) scope = scope.merge(auth_scope) end scope = scope.instance_eval(&additional_scope) if additional_scope get_collection(model_config, scope, pagination) end |