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 via http://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 at
http://groups.google.com/group/rubyonrails-talk?hl=en.