Class: ActiveAdmin::ActiveResource::Results

Inherits:
ActiveResource::Collection
  • Object
show all
Defined in:
lib/activeadmin/active_resource/results.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pageObject

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_valueObject

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_countObject

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_pagesObject

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_valuesObject



20
21
22
# File 'lib/activeadmin/active_resource/results.rb', line 20

def group_values
  nil
end