Single Table Inheritance question.
class Employee is the master model (table is employees)
class Cog is the subclass model, and uses single table inheritance to
be a subclass of Employee
class Blurfl is a normal model (table is blurfls)
in cog.rb, I have something like:
def foo
Cog.find(:all, :include=>''blurfl'', :condition=>
["cogs.status ''Active''"]
end
So we''re joining active cogs and blurfls. Now, and this is the thang,
assume that the blurlfs and cogs tables both have a status column.
The problem is that the conditional statement above won''t work. There
isn''t a cogs table. And I have to qualify the column name since it
exists in blurfls and employees.
Rails seems to have all the information it needs to do this
translation.
I find it egregious that I''d have to refer to
"employees.status"
instead of "cogs.status" in that conditional. Is there a way around
this?
--~--~---------~--~----~------------~-------~--~----~
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---