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.



6
7
8
9
10
11
12
# File 'lib/activeadmin/active_resource/results.rb', line 6

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.



4
5
6
# File 'lib/activeadmin/active_resource/results.rb', line 4

def current_page
  @current_page
end

#limit_valueObject

Returns the value of attribute limit_value.



4
5
6
# File 'lib/activeadmin/active_resource/results.rb', line 4

def limit_value
  @limit_value
end

#total_countObject

Returns the value of attribute total_count.



4
5
6
# File 'lib/activeadmin/active_resource/results.rb', line 4

def total_count
  @total_count
end

#total_pagesObject

Returns the value of attribute total_pages.



4
5
6
# File 'lib/activeadmin/active_resource/results.rb', line 4

def total_pages
  @total_pages
end

Instance Method Details

#except(*params) ⇒ Object



14
15
16
# File 'lib/activeadmin/active_resource/results.rb', line 14

def except( *params )
  self
end

#group_valuesObject



18
19
20
# File 'lib/activeadmin/active_resource/results.rb', line 18

def group_values
  nil
end