Re: [Rails] Re: What the Ruby Association

2012-07-13 Thread Colin Law
On 13 July 2012 16:13, Jean-Sébastien D. 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 bel

[Rails] Re: What the Ruby Association

2012-07-13 Thread Jean-Sébastien D.
Thanks it make more sense!!! So my structure should be as follow: class ActivitiesManager < ActiveRecord::Base belongs_to :customers belongs_to :activities class Activity < ActiveRecord::Base has_one :activities_manager class Customer < ActiveRecord::Base has_many :activities_managers ha

Re: [Rails] Re: What the Ruby Association

2012-07-12 Thread Colin Law
On 12 July 2012 17:37, Jean-Sébastien D. wrote: > Jean-Sébastien D. wrote in post #1068459: >> Walter Davis wrote in post #1068458: >>> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >>> rake db:rollback MMDDHHMMSS_model.rb >>> I don't know specifically -- what do the guides say? I

Re: [Rails] Re: What the Ruby Association

2012-07-12 Thread Colin Law
On 12 July 2012 17:30, Jean-Sébastien D. wrote: > Walter Davis wrote in post #1068458: >> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >> >>> rake db:rollback MMDDHHMMSS_model.rb >> I don't know specifically -- what do the guides say? I've only ever >> stepped back one or two at a tim

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Jean-Sébastien D. wrote in post #1068459: > Walter Davis wrote in post #1068458: >> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >> >>> rake db:rollback MMDDHHMMSS_model.rb >> I don't know specifically -- what do the guides say? I've only ever >> stepped back one or two at a time, made

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Walter Davis wrote in post #1068458: > On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: > >> rake db:rollback MMDDHHMMSS_model.rb > I don't know specifically -- what do the guides say? I've only ever > stepped back one or two at a time, made my adjustments, then run rake > db:migrate again

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Walter Davis wrote in post #1068451: > On Jul 12, 2012, at 10:58 AM, Jean-Sbastien D. wrote: > >>> >>> you find that a real fk is the only way, look at the Foreigner gem, >>> guide. The id, created_at, and updated_at columns are all "assumed" in >> >> db:migrate to refresh with the newest options,

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Walter Davis wrote in post #1068445: > On Jul 12, 2012, at 10:27 AM, Jean-Sbastien D. wrote: > >> Hi everyone, >> >> I just started learning ruby on rails coming from php and mysql worlds. >> The tutorial are getting really confusing!!! According to this >> http://guides.rubyonrails.org/migrations.