Sha256: ff7a300686b06289bcbf8d93c449703c9905f90c8aba9504b8058adce70aa04f
Contents?: true
Size: 282 Bytes
Versions: 2
Compression:
Stored size: 282 Bytes
Contents
require 'active_record' class ActiveRecord::Base def self.paginate(*args) options = args.extract_options! per_page = options.delete(:per_page) || RailsPaginate.per_page page = options.delete(:page) || 1 RailsPaginate::Collection.new(self, page, per_page) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_paginate-0.0.2 | lib/rails_paginate/core_ext/active_record.rb |
rails_paginate-0.0.1 | lib/rails_paginate/core_ext/active_record.rb |