Class: ActiveAdmin::Filters::Active
- Inherits:
-
Object
- Object
- ActiveAdmin::Filters::Active
- Defined in:
- lib/active_admin/filters/active.rb
Instance Attribute Summary collapse
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
Instance Method Summary collapse
- #all_blank? ⇒ Boolean
-
#initialize(resource, search) ⇒ Active
constructor
A new instance of Active.
Constructor Details
#initialize(resource, search) ⇒ Active
Returns a new instance of Active.
15 16 17 18 19 |
# File 'lib/active_admin/filters/active.rb', line 15 def initialize(resource, search) @resource = resource @filters = build_filters(search.conditions) @scopes = search.instance_variable_get(:@scope_args) end |
Instance Attribute Details
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
7 8 9 |
# File 'lib/active_admin/filters/active.rb', line 7 def filters @filters end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
7 8 9 |
# File 'lib/active_admin/filters/active.rb', line 7 def resource @resource end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
7 8 9 |
# File 'lib/active_admin/filters/active.rb', line 7 def scopes @scopes end |
Instance Method Details
#all_blank? ⇒ Boolean
21 22 23 |
# File 'lib/active_admin/filters/active.rb', line 21 def all_blank? filters.blank? && scopes.blank? end |