Skip to content

Instantly share code, notes, and snippets.

@trappist
Created July 24, 2012 19:55
Show Gist options
  • Select an option

  • Save trappist/3172238 to your computer and use it in GitHub Desktop.

Select an option

Save trappist/3172238 to your computer and use it in GitHub Desktop.
broken will_paginate
will_paginate(@statuses)
class StatusesController < ApplicationController
def index
@statuses = current_user.statuses.includes(:posts).published.order('created_at DESC').paginate(:page => params[:page], :per_page => 15)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment