Class: ActiveAdmin::ActiveResource::Results
- Inherits:
-
ActiveResource::Collection
- Object
- ActiveResource::Collection
- ActiveAdmin::ActiveResource::Results
- Defined in:
- lib/activeadmin/active_resource/results.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
Returns the value of attribute current_page.
-
#limit_value ⇒ Object
Returns the value of attribute limit_value.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
-
#total_pages ⇒ Object
Returns the value of attribute total_pages.
Instance Method Summary collapse
- #except(*_params) ⇒ Object
- #group_values ⇒ Object
-
#initialize(elements = []) ⇒ Results
constructor
A new instance of Results.
Constructor Details
#initialize(elements = []) ⇒ Results
Returns a new instance of Results.
8 9 10 11 12 13 14 |
# File 'lib/activeadmin/active_resource/results.rb', line 8 def initialize(elements = []) super elements @limit_value = ActiveAdmin.application.default_per_page @total_count = 0 @total_pages = 1 @current_page = 1 end |
Instance Attribute Details
#current_page ⇒ Object
Returns the value of attribute current_page.
6 7 8 |
# File 'lib/activeadmin/active_resource/results.rb', line 6 def current_page @current_page end |
#limit_value ⇒ Object
Returns the value of attribute limit_value.
6 7 8 |
# File 'lib/activeadmin/active_resource/results.rb', line 6 def limit_value @limit_value end |
#total_count ⇒ Object
Returns the value of attribute total_count.
6 7 8 |
# File 'lib/activeadmin/active_resource/results.rb', line 6 def total_count @total_count end |
#total_pages ⇒ Object
Returns the value of attribute total_pages.
6 7 8 |
# File 'lib/activeadmin/active_resource/results.rb', line 6 def total_pages @total_pages end |
Instance Method Details
#except(*_params) ⇒ Object
16 17 18 |
# File 'lib/activeadmin/active_resource/results.rb', line 16 def except(*_params) self end |
#group_values ⇒ Object
20 21 22 |
# File 'lib/activeadmin/active_resource/results.rb', line 20 def group_values nil end |