# Methods are not visible... I'm sure this is an easy one

**URL:** <https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777>\
**Category:** Rails\
**Created:** [December 20, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777 "2007-12-20T16:16:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gavin](https://www.ruby-forum.com/u/gavin)\
**Post date:** [December 20, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777/1 "2007-12-20T16:16:18Z")

</div>

I’m adding methods to my models and for some reason all these new  
methods are not invisible when I call them. For example,

def target\_language  
Language.find(self.target\_language\_id)  
end

def bob  
Language.find(self.origin\_language\_id)  
end

I can call target\_language, but when I call bob, I get "undefined  
method. But it’s exactly the same! I restarted mongrel and still  
every _new_ method is just invisible. Why is this?

---

<div class="post-metadata">

**Author:** ![gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gavin](https://www.ruby-forum.com/u/gavin)\
**Post date:** [December 20, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777/2 "2007-12-20T16:56:50Z")

</div>

On 20 Dec 2007, at 15:15, Gavin wrote:

> end  
> I think you’re going to have to show us some more information than this.

Fred

---

<div class="post-metadata">

**Author:** ![gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gavin](https://www.ruby-forum.com/u/gavin)\
**Post date:** [December 20, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777/3 "2007-12-20T21:06:35Z")

</div>

You are putting these INSIDE the class, right?

---

<div class="post-metadata">

**Author:** ![gavin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gavin](https://www.ruby-forum.com/u/gavin)\
**Post date:** [December 20, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777/4 "2007-12-20T18:47:02Z")

</div>

On Dec 20, 7:15 am, Gavin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m adding methods to my models and for some reason all these new  
> methods are not invisible when I call them. For example,

Make some kind of syntax error in target\_language, then call it.  
That’ll at least make sure you’re changing the source you think you  
are. It’ll also reveal if the class is just being cached.

///ark
