Ruby on Rails Tuesday, November 4, 2014



On Tuesday, October 28, 2014 1:14:56 PM UTC, Max Grønlund wrote:
Consider this schenario where I'm having pagination on a page

@recordings =  Recording.order(:title).page(params[:page]).per(4)  

Is the issue that title is not in fact unique?

If so you could order on two columns (rather than creating an extra unique column), for example

Recording.order(:title, :id).page(params[:page]).per(4)

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/64166fb7-bfe8-473d-8c34-c431c212ba17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment