Re: insert_html inserting fragment twice

mixplate
Sun, 17 Dec 2006 13:53:06 -0000

hi can you explain more what you meant? basically what your
link_to_remote looks like?

mine is simply

  <% link_to_remote "view comments", :url => { :controller =>
''main'',
:action => ''test_rjs'', Lid => @myObj%>


my comments get inserted twice.

THANKS@!


mofo mofo wrote:
> 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.


--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---