class Array

Public Instance Methods

smart_paginate(options={}) click to toggle source
# File lib/grasshopper_paginate/array.rb, line 4
def smart_paginate(options={})
  per_page = options[:per_page] || WillPaginate.per_page
  options[:per_page] = (per_page*1.5).to_i if self.count <= per_page*1.5
  paginate options
end