Displaying 2 results from an estimated 2 matches for "main_address".
Did you mean:
mail_address
2006 Jul 30
3
ActiveRecord - Multiple Address for a single record
...assocation. Here is
my challange. Mapping to location seems simple:
class Location < ActiveRecord::Base
has_one :address, :as => :addressable
end
What I''m having trouble with is the company model. I''ve currently got:
class Company < ActiveRecord::Base
has_one :main_address, :as => :addressable
has_one :billing_address, :as => :addressable
has_one :alternate_billing_address, :as => :addressable
has_many :locations
end
This is clearly not current, as each address record only has room to
point back to a single company record...
2006 Nov 04
0
Problems with ActiveRecord, Oracle adapter, find_by_sql, multi-table join - ORA-04043 error
...quipment e2,
schema.building b, schema.cust_loc cl, schema.location loc
WHERE e2.equipment_id = e1.equipment_id
AND e2.some_column like ''SOME_VAL%''
AND e1.equipment_id = ne.net_element_id
AND ne.class_name = ''FooBar''
AND e1.building_id = b.building_id
AND b.main_address = cl.cust_loc_id
AND cl.location_id = loc.location_id
So, I setup a class for the ''Location'' table like this:
class OracleLocation < ActiveRecord::Base
establish_connection(
:adapter => "oracle",
:database => "our_db",
:username...