Module: WillPaginate::ActiveRecord::RelationMethods

Defined in:
lib/ab_admin/hooks/paginate_hooks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#paginate_idsObject

Returns the value of attribute paginate_ids.



5
6
7
# File 'lib/ab_admin/hooks/paginate_hooks.rb', line 5

def paginate_ids
  @paginate_ids
end

#paginate_limitObject

Returns the value of attribute paginate_limit.



5
6
7
# File 'lib/ab_admin/hooks/paginate_hooks.rb', line 5

def paginate_limit
  @paginate_limit
end

#paginate_offsetObject

Returns the value of attribute paginate_offset.



5
6
7
# File 'lib/ab_admin/hooks/paginate_hooks.rb', line 5

def paginate_offset
  @paginate_offset
end

Instance Method Details

#offset(value = nil) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/ab_admin/hooks/paginate_hooks.rb', line 15

def offset(value = nil)
  if value.nil?
    paginate_offset || offset_value
  else
    super(value)
  end
end

#per_page(value = nil) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/ab_admin/hooks/paginate_hooks.rb', line 7

def per_page(value = nil)
  if value.nil?
    paginate_limit || limit_value
  else
    limit(value)
  end
end