On Oct 2, 9:55 am, "Sean Clark Hess" <[EMAIL PROTECTED]> wrote:
> What is the best way to track order in a model? For example, maybe the user
> can reorder items in a todo list.
> I've thought of including a field called "order" or something, but then I'd
> have to update every single one when I change the order. I've also thought
> of specifying the "order" as a number in the thousands, and just halve the
> difference whenever something is inserted between something else.
>
> I could try to create some kind of linked-list in the database (so, specify
> "nextItem" and then update them accordingly), but that's kind of hacky.
>
> One other idea is to have a separate model that tracks the order somehow.
>
> Any ideas?
>
> Thanks!
> ~sean

Have you tried acts_as_list?
--~--~---------~--~----~------------~-------~--~----~
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