Actually, nevermind. I was going about the problem the wrong way. Proper
way:
class Model < AR::Base
has_many :model_items
# also holds :key_one_id, :key_two_id, :key_three_id
end
class ModelItem < AR::Base
belongs_to :model
acts_as_list :scope => :model_id
end
Much, much cleaner.
Jason
On 3/28/07, Jason Roelofs
<jameskilton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Here''s what I''m trying to do:
>
> class Model < AR::Base
> acts_as_list :scope => [:key_one_id, :key_two_id, :key_three_id]
> end
>
> with the idea being that there are these three references from this table
> (one of them being optional) that define the list. I don''t think
acts as
> nested set works in this situation because I''m still just dealing
with a
> single list per these three keys; there are no children or parents to speak
> of.
>
> Is this easily possible or should I look into changing acts_as_list to
> work this way?
>
> Jason
>
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---