Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed paginate_records method to using AR methods #7

Merged
merged 1 commit into from Aug 15, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Change paginate method
  • Loading branch information
Bishop committed Jul 27, 2012
commit 27b375ca9f14845569d314d7c9157df6fd38b014
2 changes: 1 addition & 1 deletion lib/ajax-datatables-rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def fetch_records
end

def paginate_records(records)
records.page(page).per(per_page)
records.offset((page - 1) * per_page).limit(per_page)
end

def sort_records(records)
Expand Down