If you want list like behavior for your x and y array then have to use
acts_as_list declaration. Without knowing your application requirements, it
is difficult to suggest anything.
The option for class name should be: :class_name. Except for that, it looks
fine. You may also want to specify the :dependent attribute.
>
> I want an object ''a'' with two members x[ ] and y [ ]
where both are
> collections of type class B - thus my table for B contains two types of
> row.
>
> Is this a sensible implementation?
>
> class A
> has_many :type_1
> :class => "B"
> :foreign_key => "a_id"
> :conditions "where type=1"
> has_many :type_2
> :class => "B"
> :foreign_key => "a_id"
> :condition "where type=2"
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---