Forum: Ruby on Rails Using standard helper methods in my helpers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9230215bf47388a84f4b32397e352c6b?d=identicon&s=25 Jacek Olszak (Guest)
on 2006-01-01 18:57
Hi... I've written some simple helper method. My method uses standard
helper methods from Rails. When I try to use them from templates -
everything is working, but when I try to execute from my helper I get an
exception. Here is my code:

module ApplicationHelper
  def reset_add_function
    r=update_element_function("add") {
      link_to_remote( "Nowy watek", :update => "add", :url =>
{:controller=>"add", :action => "add" } )
    }
  end
end

The reset_add_function throw an exception:

undefined local variable or method `_erbout' for
#<#<Class:0x385b0a8>:0x385afd0>

in line where update_element_function is used


What's wrong with this code? It is not possible to use standard helper
methods from my helpers ?

Regards
Jacek
This topic is locked and can not be replied to.