Forum: Ruby on Rails Possible bug

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
paulchin (Guest)
on 2005-12-06 11:31
(Received via mailing list)
Hi all I'm trying user alias_method to overload the link_to method,  It
works the first time,  but when I reload the page, it will have an error
"stack level too deep".

I'm using rails 0.14.3  ruby 1.8.2 Webrick in winxp, I suspect it is a

this is my helper's code

module UsersHelper
  include ActionView::Helpers::UrlHelper

  alias_method :link_to_original, :link_to

  def link_to(name, options = {}, html_options =
     if permission?
       link_to_original( name,
options,html_options,*parameters_for_method_reference )

dee.zsombor (Guest)
on 2005-12-06 12:00
(Received via mailing list)
Paul C. wrote:
> end

Does this happen in production mode or just in development? In
code is reloaded on every request. On the second request you will loose
link_to_original, both methodnames will cover your link_to version ...
This topic is locked and can not be replied to.