On 13 July 2012 16:13, Jean-Sébastien D. <li...@ruby-forum.com> wrote:
> Thanks it make more sense!!!
>
> So my structure should be as follow:
> class ActivitiesManager < ActiveRecord::Base
>   belongs_to :customers
>   belongs_to :activities

Please answer the question - how many customers does an
activitiesmanager belong to?

> class Activity < ActiveRecord::Base
>   has_one :activities_manager
> class Customer < ActiveRecord::Base
>   has_many :activities_managers
>   has_many :activities,  :through => :activities_managers
>
> I also read the entire book 3 time in the last 2 weeks
> http://ruby.railstutorial.org/chapters/

Reading it is not enough.  Work right through it, typing and running
the code on your PC, make sure you understand every single line of
code.  Do all the exercises.

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@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