A
Aldric Giacomoni
I have this:
require 'activerecord'
class RefPhys < ActiveRecord::Base
set_table_name "tbRefPhys"
has_many :refphyslocations, :foreign_key => "refphysid"
end
class RefPhysLocation < ActiveRecord::Base
set_table_name "tbRefPhysLocations"
belongs_to :refphys, :foreign_key => "refphysid"
end
I want a list of the refphys names (in refphys) in a specific city (in
refphyslocation).
So...
RefPhys.findall, :joins => ['refphyslocation'] .... ?
I don't grok AR yet :/
Thanks,
-Aldric
require 'activerecord'
class RefPhys < ActiveRecord::Base
set_table_name "tbRefPhys"
has_many :refphyslocations, :foreign_key => "refphysid"
end
class RefPhysLocation < ActiveRecord::Base
set_table_name "tbRefPhysLocations"
belongs_to :refphys, :foreign_key => "refphysid"
end
I want a list of the refphys names (in refphys) in a specific city (in
refphyslocation).
So...
RefPhys.findall, :joins => ['refphyslocation'] .... ?
I don't grok AR yet :/
Thanks,
-Aldric