Finne Jager wrote in post #968650:
> Jesse wrote in post #968644:
>> On 12/15/10 12:40 PM, Finne Jager wrote:
>>> Just another quick question if you don't mind.

Please start a new thread for a new issue in the future.

[...]
> The Timesheet only has_one SafetyOfficer:
> --------------------------
> class Timesheet < ActiveRecord::Base
>   belongs_to :incident
>
>   has_one :command_officer
>   has_one :fire_chief
>   has_many :fire_fighters
>   has_one :safety_officer
>   has_many :emts
>
>         ... and about 10 more
> ---------------------------

Can one safety officer appear on multiple timesheets?  If so, then 
you'll want all those has_one associations to be belongs_to instead. 
Please review the difference between the two.  Likewise, has_many 
:fire_fighters should probably be has_and_belongs_to_many, for the same 
reason.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

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

Reply via email to