lib/active_set/paginate/processor.rb in activeset-0.1.0 vs lib/active_set/paginate/processor.rb in activeset-0.2.0

- old
+ new

@@ -6,20 +6,24 @@ class ActiveSet module Paginate class Processor < BaseProcessor def process return @set if @set.count < pagesize - adapter.new(@structure[:page], pagesize).process(@set) + adapter.new(page_number, pagesize).process(@set) end private def adapter EnumerableAdapter end + def page_number + @structure[[:page]] || 1 + end + def pagesize - @structure[:size] || 25 + @structure[[:size]] || 25 end end end end