problems with methods... help

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: <tr class="<%= cycle('odd', 'even') -%>"> 9: <% grupo.each do |amigo| %> 10: <td>lolo <%= paco(amigo.jid) %></td> 11: <td><%= amigo.jid %></td> 12: <% end %> 13: </tr>

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.

Try putting your method in a helper instead of controller (either application_helper.rb or rosteritems_helper.rb)

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

:frowning: