Hi, What you need is to watch a Railscast: http://media.railscasts.com/videos/147_sortable_lists.mov
It will explain all you need and save you hours of work. On May 16, 6:21 am, Albus Dumbledore <[email protected]> wrote: > Well. I am having trouble understanding how acts_as_list works. I do not > quite comprehend what the table schema for the example given by DHH must > be: > > [code] > > class TodoList < ActiveRecord::Base > has_many :todo_items, :order => "position" > end > > class TodoItem < ActiveRecord::Base > belongs_to :todo_list > acts_as_list :scope => :todo_list > end > > [/code] > > More precisely I wonder where should the `position` column go? To me it > looks like it should go with the table having the foreign keys, i.e. > `todo_items` table. Then it would seem that there would be no need for a > `todo_lists` table, right? So it would be all about the todo_items > table. > > Thank you! > -- > Posted viahttp://www.ruby-forum.com/. > > -- > 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 > athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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.

