Module: WillPaginate::Mongoid::CollectionMethods
- Defined in:
- lib/error_stalker/will_paginate/mongoid.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
readonly
Returns the value of attribute current_page.
Instance Method Summary collapse
Instance Attribute Details
#current_page ⇒ Object (readonly)
Returns the value of attribute current_page.
28 29 30 |
# File 'lib/error_stalker/will_paginate/mongoid.rb', line 28 def current_page @current_page end |
Instance Method Details
#offset ⇒ Object
38 39 40 |
# File 'lib/error_stalker/will_paginate/mongoid.rb', line 38 def offset @page_multiplier * per_page end |
#total_entries ⇒ Object
30 31 32 |
# File 'lib/error_stalker/will_paginate/mongoid.rb', line 30 def total_entries @total_entries ||= count end |
#total_pages ⇒ Object
34 35 36 |
# File 'lib/error_stalker/will_paginate/mongoid.rb', line 34 def total_pages (total_entries / per_page.to_f).ceil end |