Re: Re: Re: Re: Association In rails

Colin Law
Mon, 16 Jul 2012 15:51:38 -0000

On 16 July 2012 16:43, Jean-Sébastien D.
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:
> Colin Law wrote in post #1068932:
>> On 16 July 2012 16:31, Jean-Sbastien D.
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
>>>>
>>>> Colin
>>>
>>> I believe it is active_admin, but i am just wondering if the
Association
>>> above seem to be correct, or i am totally missing the point of ruby
on
>>> rails association, like did i make mistake
>>
>> It looks ok to me.
>>
>> Colin
>
> I come from mySQL where I would have 3 tables
>
> Customer                TvShowManager                     TvShow
> JOHN                    JEAN  tv_show_id(1)               1 Simpson
> HEATHER                 JEAN  tv_show_id(2)               2 Familly Guy
> JASON                   JASON tv_show_id(3)               3 Simpson
>                         HEATHER tv_show_id(4)             4 Batman
>                         HEATHER tv_show_id(5)             5 Stargate
>
> Customer may have many tv_show_managers, and many tv_show through
> tv_show_managers
>
> Tv_show_Managers belongs_to customer
> Tv_show_Managers belongs_to tv_show
>
> Tv_show has_one tv_show_manager
> Tv_show has_one customer, through tv_show_manager
>
>
> Is it possible, or is dead wrong?

As I said it looks ok to me.  Show us your db/schema.rb

Colin

--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.