Hi,
I am using following configuration on my production environment:
Rails (2.0.2)
Mongrels
Ruby 1.8.6
I am getting following error after my server runs for some hour (6-8
hr). Also, the problem
goes away once i restart all my mongrels (only to come up in next 6-8
hr ).
Following is the trace of error:
ActionView::TemplateError (undefined method `billing_contactâ for
#Domain::ResellerDomain:0x2aaaaea710f8) on line #55 of domain/
contact_information.html.erb:
52:
53:
54: <!-- contact divs startâ
55: <%contacts = {"billing" => @domain.billing_contact,
56: "registrant" => @domain.registrant_contact,
57: "tech" => @domain.tech_contact,
58: "admin"=> @domain.admin_contact,
vendor/rails/activerecord/lib/active_record/
attribute_methods.rb:206:in `method_missingâ
My classes are defined as:
module Domain
class DomainProduct < ActiveRecord::Base
set_table_name :domain_domain_products
has_one :privacy_product, :class_name =>
âDomain::Privacyâ, :foreign_key => âdomain_idâ
belongs_to :registrant_contact, :class_name =>
âStore::Contactâ, :foreign_key => âregistrant_contact_idâ
belongs_to :admin_contact, :class_name =>
âStore::Contactâ, :foreign_key => âadmin_contact_idâ
belongs_to :tech_contact, :class_name =>
âStore::Contactâ, :foreign_key => âtech_contact_idâ
belongs_to :billing_contact, :class_name =>
âStore::Contactâ, :foreign_key => âbilling_contact_idâ
belongs_to :user, :class_name => âStore::Userâ, :foreign_key =>
âuser_idâ
belongs_to :status, :class_name => âDomain::Statusâ, :foreign_key
=> âstatus_idâ
....
....
some more stuff in the class
/****Class definition end ******/
module Domain
class ResellerDomain < DomainProduct
end
end
/******class definition end ****/
I have done a lot of google search to fix this but to no avail.
Any help would be greatly appreciated.
Thanks,
ubhay.