[Rails] Re: insert_html inserting fragment twice

mofo mofo
Wed, 26 Jul 2006 05:28:04 -0000

I found the answer.

I had :complete => ''eval(request.responseText)'' in my
link_to_remote
function, which was causing it to evaluate a second time.  This
behaviour is new in Rails 1.1.

mofo mofo wrote:
> Has anyone had trouble with inline RJS insert_html with the latest
> version of Rails?
>
> My problem is that insert_html inserts the html fragment twice.  For
> example,
>
>     render :update do |page|
>         page.insert_html :top, "some_list",
" booyow "
>     end
>
> would render " booyow " twice.
>
> Thanks.