Class: Pageflow::Admin::CustomScopesRenderer
- Inherits:
-
ActiveAdmin::Views::Scopes
- Object
- ActiveAdmin::Views::Scopes
- Pageflow::Admin::CustomScopesRenderer
- Defined in:
- app/views/components/pageflow/admin/custom_scopes_renderer.rb
Overview
Instance Method Summary collapse
Instance Method Details
#build(scopes, options = {}) ⇒ Object
6 7 8 9 |
# File 'app/views/components/pageflow/admin/custom_scopes_renderer.rb', line 6 def build(scopes, = {}) @default_scope = .delete(:default_scope) super end |
#current_scope?(scope) ⇒ Boolean
11 12 13 14 15 16 17 |
# File 'app/views/components/pageflow/admin/custom_scopes_renderer.rb', line 11 def current_scope?(scope) if params[:scope] params[:scope] == scope.id else @default_scope.to_s == scope.id end end |