# Problems with methods... help

**URL:** <https://www.ruby-forum.com/t/problems-with-methods-help/139229>\
**Category:** Rails\
**Created:** [June 2, 2008, 5:48am UTC](https://www.ruby-forum.com/t/problems-with-methods-help/139229 "2008-06-02T05:48:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 2, 2008, 5:48am UTC](https://www.ruby-forum.com/t/problems-with-methods-help/139229/1 "2008-06-02T05:48:47Z")

</div>

Hi I made a simple example that is not the original but is giving me the  
same issue…  
I create a method on my controller… and make it so I cant sent him data  
to work with and return me the results…  
but I keep getting that is an underfined method…! ;-(

error:

ActionView::TemplateError (undefined method `paco’ for  
#\<#Class:0x2b1dcace86d8:0x2b1dcafabc80\>) on line #10 of  
app/views/rosteritems/\_amigos.rhtml:  
7:  
8:   
9: \<% grupo.each do |amigo| %\>  
10: lolo \<%= paco(amigo.jid) %\>  
11: \<%= amigo.jid %\>  
12: \<% end %\>  
13:

the controller method paco:

def paco(msg)

```
    end

```

obviosly this is simple as it gets for the example…  
I don’t know why is saying that paco is undefined!

thanks.

–  
A Spectre is haunting multinational capitalism–the spectre of free  
information.  
All the powers of ``globalism’’ have entered into an unholy alliance to  
exorcize this spectre:  
Microsoft and Disney, the World Trade Organization, the United States  
Congress and the European Commission.  
Eben Moglen from the FSF.  
[http://emoglen.law.columbia.edu/publications/dcm.html](http://emoglen.law.columbia.edu/publications/dcm.html)

Solidarity:  
[http://www.dailyradical.org](http://www.dailyradical.org)  
[http://www.diarioradical.org](http://www.diarioradical.org)  
[http://www.spboston.org](http://www.spboston.org)

> **[MESSIPOKER - Situs Judi Slot Online Dan Toto 4D Togel Terbaru](https://binaryfreedom.info/)**
>
> MESSIPOKER ialah situs judi slot online terbaik dan toto 4D online terpercaya no 1 di Indonesia yang siap memberikan pelayanan maksimal kepada anda.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 2, 2008, 6:02am UTC](https://www.ruby-forum.com/t/problems-with-methods-help/139229/2 "2008-06-02T06:02:50Z")

</div>

Try putting your method in a helper instead of controller (either  
application\_helper.rb or rosteritems\_helper.rb)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 2, 2008, 6:33am UTC](https://www.ruby-forum.com/t/problems-with-methods-help/139229/3 "2008-06-02T06:33:15Z")

</div>

rubynuby wrote:

> Try putting your method in a helper instead of controller (either  
> application\_helper.rb or rosteritems\_helper.rb)

I just tried that and same results:  
ActionView::TemplateError (undefined method `paco’ for  
#\<#Class:0x2b1dcace86d8:0x2b1dcb069550\>) on line #10 of  
app/views/rosteritems/\_amigos.rhtml

☹
