Class: Liquor::Pagination::Scope

Inherits:
Drop::Scope show all
Defined in:
lib/liquor/extensions/pagination.rb

Instance Attribute Summary

Attributes inherited from Drop::Scope

#source

Instance Method Summary collapse

Methods inherited from Drop::Scope

#[], #count, #each, #entity, #except, #find_all_by, #find_by, #find_except_by, #first, #include?, #initialize, #last, #limit, #offset, #pluck, #reverse, #to_a

Methods included from External

included, #liquor_send

Constructor Details

This class inherits a constructor from Liquor::Drop::Scope

Instance Method Details

#per_page(size) ⇒ Object



142
143
144
# File 'lib/liquor/extensions/pagination.rb', line 142

def per_page(size)
  @source.per(size).to_drop
end

#total_entriesObject



138
139
140
# File 'lib/liquor/extensions/pagination.rb', line 138

def total_entries
  @source.total_count
end