Module: ActiveAdmin::ResourceController::Collection::Scoping
- Includes:
- ScopeChain
- Included in:
- ActiveAdmin::ResourceController::Collection
- Defined in:
- lib/active_admin/resource_controller/collection.rb
Instance Method Summary (collapse)
- - (Object) active_admin_collection protected
- - (Object) collection_before_scope protected
- - (Object) current_scope protected
- - (Object) scope_current_collection(chain) protected
Methods included from ScopeChain
Instance Method Details
- (Object) active_admin_collection (protected)
86 87 88 |
# File 'lib/active_admin/resource_controller/collection.rb', line 86 def active_admin_collection scope_current_collection(super) end |
- (Object) collection_before_scope (protected)
100 101 102 |
# File 'lib/active_admin/resource_controller/collection.rb', line 100 def collection_before_scope @collection_before_scope end |
- (Object) current_scope (protected)
107 108 109 110 111 112 113 |
# File 'lib/active_admin/resource_controller/collection.rb', line 107 def current_scope @current_scope ||= if params[:scope] active_admin_config.get_scope_by_id(params[:scope]) if params[:scope] else active_admin_config.default_scope end end |
- (Object) scope_current_collection(chain) (protected)
90 91 92 93 94 95 96 97 98 |
# File 'lib/active_admin/resource_controller/collection.rb', line 90 def scope_current_collection(chain) @collection_before_scope = chain if current_scope scope_chain(current_scope, chain) else chain end end |