Created
October 16, 2010 21:28
-
-
Save jakcharlton/630286 to your computer and use it in GitHub Desktop.
will_devise and mongoid ... how to sort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@posts.paginate(:page => params[:page], | |
:per_page => 20, | |
:sort => [['added', :asc]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment