Given one model with a more complex sort in it. 
@products = Product.all

If I now have the ID of a product that is in @products - what is the best 
way to find the previous/next element (keeping the model sort in mind, e.g. 
the previous / next with respect to the custom sort, not with respect to the 
database)? Is there a better way than stepping through using .each?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to