# Undefined method AFTER First load

**URL:** <https://www.ruby-forum.com/t/undefined-method-after-first-load/89961>\
**Category:** Rails\
**Created:** [March 24, 2007, 5:53am UTC](https://www.ruby-forum.com/t/undefined-method-after-first-load/89961 "2007-03-24T05:53:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kate\_rhodes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/2bfe46/32.png) [@kate\_rhodes](https://www.ruby-forum.com/u/kate_rhodes)\
**Post date:** [March 24, 2007, 5:53am UTC](https://www.ruby-forum.com/t/undefined-method-after-first-load/89961/1 "2007-03-24T05:53:22Z")

</div>

I have a fairly simple model to which i’ve added a method:

def pro?  
return true  
end

For some reason myModel.pro? works just fine the First time i call it.  
But when i reload the page i get an undefined method error.

The symptoms are very similar to  
[http://dev.rubyonrails.org/ticket/3930](http://dev.rubyonrails.org/ticket/3930)

except that it’s a normal model that’s not importing anything funky  
and is in the standard models folder.

Has anyone else seen this?

I’ve got an older version of the codebase that doesn’t have this  
problem when run under the same conditions, so obviously it’s not  
rails itself but something I’ve borked… I’m just at a bit of a loss  
as to what.

I’ve tried it with rails 1.2.2, 1.2.3 and edge all under mongrel with  
ruby 1.8.5 on ubuntu edgy.

–

- kate = masukomi  
[http://weblog.masukomi.org/](http://weblog.masukomi.org/)

---

<div class="post-metadata">

**Author:** ![kate\_rhodes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/2bfe46/32.png) [@kate\_rhodes](https://www.ruby-forum.com/u/kate_rhodes)\
**Post date:** [March 24, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/undefined-method-after-first-load/89961/2 "2007-03-24T16:53:55Z")

</div>

On 3/24/07, kate rhodes [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [http://dev.rubyonrails.org/ticket/3930](http://dev.rubyonrails.org/ticket/3930)  
> For future people the problem seems to be that when i import a module  
> into my controller custom methods go missing on my models. I have no  
> solution for this yet.

–

- kate = masukomi  
[http://weblog.masukomi.org/](http://weblog.masukomi.org/)
