Thanks Fred
On Apr 7, 11:02 am, Frederick Cheung
wrote:
> On Apr 7, 9:32 am, "johnmcau...@gmail.com"
> wrote:
>
>
>
>
>
> > Hey everyone,
>
> > Just a quick Q.
>
> > Can anybody point me to some resources regarding a modeling quandary I
> > am in. I have to develop a meta system that allows use
On Apr 7, 9:32 am, "johnmcau...@gmail.com"
wrote:
> Hey everyone,
>
> Just a quick Q.
>
> Can anybody point me to some resources regarding a modeling quandary I
> am in. I have to develop a meta system that allows users to specify
> their own model variables. For instance, I have a model Team
Look up has_many and belongs_to
On Mar 8, 4:03 pm, Greg Ma wrote:
> Hi,
>
> I have these 3 models:
> City :name
> Product :name
> city_preference :city_id, :product_id, :min, :max
>
> How do i create the associations between these tables?
> Best
> Greg
> --
> Posted viahttp://www.ruby-forum.com/.
Sorry for the delay in getting back on this but I've just got back from a
weekend away.
Okay, so Max, you and I agree on the modelling for this concept so that
starts to narrow down where my problem is.
To begin with, I thought my problem was because I had a join model acting as
the parent to ano
>
> 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.
I'm not saying MAIN_AUTHOR has to be displayed anywhere, display logi
On 5 March 2010 13:18, Andy Jeffries 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
>
> 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
Ready for the follow-up :-)
Cheers,
Andy
--
You received this message because you are sub
I would do:
Book
has_many :authorings
has_many :authors, :through => :authorings
Authoring
belongs_to :book
belongs_to :author
has_many :authoring_roles
has_many :roles, :through => :authoring_roles
AuthoringRole
belongs_to :authoring
belongs_to :role
Role
has_many :authoring_
8 matches
Mail list logo