On 5 March 2010 13:18, Andy Jeffries <[email protected]> wrote: >> Book >> Authoring >> AuthoringRole >> Role >> Author > > I did this in 3 models, I don't know who models the OP's requirements more > closely, but for now here's my modelling: > http://gist.github.com/322710
You may have squashed it into fewer models, but the relationships do not map the real world relationships intuitively. You have that a Book has many Roles, whereas in the real world a book does not have roles at all, it is the author that has the roles in association with a particular book. Also by using a string for the role_type you will have many Role records with "MAIN_AUTHOR" for example. If you later decided that "Primary Author" would be better you would have to change the string in many records. Colin > Ready for the follow-up :-) > Cheers, > > Andy > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

