Colin Law wrote in post #1068584:
> On 13 July 2012 15:35, Jean-Sbastien D. <li...@ruby-forum.com> wrote:
>>> used the plural suggests it belongs to several, but that does not seem
>> example, the customer and activities_managers is my actual names. Here
>> the real test lookup
>>
>> class ActivitiesManager < ActiveRecord::Base
>>   belongs_to :customers
>
> If you followed my advise and worked through some tutorials you might
> not make so many silly mistakes.  How many customers does an
> ActivitiesManager belong to?  The fact that you have said belongs_to
> customers suggests that it belongs to more than one customer, which is
> unlikely.
>
>>   belongs_to :activities
>
> Ditto
>
> Colin

It his has follow

Customer              Manager                         Activity
John                  John 1 2012-01-05               1 Soccer
Josh                  John 3 2012-01-07               2 Hockey
                      Josh 2 2012-01-05               3 Footbal

The purpose is to keep track of everything

So there the model
Customer has_many Manager
Manager belongs to Customer
Manager belongs to Activity
Activity has_one Manager

Does this make sense?

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en-US.

Reply via email to