Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord using model in another model
#3

[eluser]flokky[/eluser]
[quote author="xwero" date="1206547990"]Why do you put the getCategoryName in the Newscontent model? It should be in the Newscategory model where it belongs.[/quote]

At first I've done that, but after a while, I changed it. Since my content always belongs to a category, I would like it to 'automatically' fetch the categoryname.

Suppose we stick to your idea. How would you join those two together? Can you give an example because I'm stuck here ;-)


Messages In This Thread
ActiveRecord using model in another model - by El Forum - 03-26-2008, 04:49 AM
ActiveRecord using model in another model - by El Forum - 03-26-2008, 05:13 AM
ActiveRecord using model in another model - by El Forum - 03-26-2008, 05:32 AM
ActiveRecord using model in another model - by El Forum - 03-26-2008, 05:52 AM
ActiveRecord using model in another model - by El Forum - 03-26-2008, 05:57 AM
ActiveRecord using model in another model - by El Forum - 03-27-2008, 04:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB