Sha256: bac23aa8a84cf7144aa4e45bd381b6a3cd6a943a754fafc4d070295484590827
Contents?: true
Size: 435 Bytes
Versions: 3
Compression:
Stored size: 435 Bytes
Contents
module RailsPaginate::Helpers # Array extension for create paginate collection module Array # paginate with options # # page = active page # per_page = how much entries per page def paginate(*args) options = args.extract_options! per_page = options.delete(:per_page) page = options.delete(:page) || 1 ::RailsPaginate::Collection.new(self, args.first || page, per_page) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails_paginate-0.0.7 | lib/rails_paginate/helpers/array.rb |
rails_paginate-0.0.6 | lib/rails_paginate/helpers/array.rb |
rails_paginate-0.0.5 | lib/rails_paginate/helpers/array.rb |