# ActionView::TemplateError (undefined method

**URL:** <https://www.ruby-forum.com/t/actionview-templateerror-undefined-method/135157>\
**Category:** Rails\
**Created:** [April 18, 2008, 4:44pm UTC](https://www.ruby-forum.com/t/actionview-templateerror-undefined-method/135157 "2008-04-18T16:44:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ubhay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/90ced4/32.png) [@ubhay](https://www.ruby-forum.com/u/ubhay)\
**Post date:** [April 18, 2008, 4:44pm UTC](https://www.ruby-forum.com/t/actionview-templateerror-undefined-method/135157/1 "2008-04-18T16:44:12Z")

</div>

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.
