Hi Jedrin, On Tue, May 31, 2011 at 5:11 PM, Jedrin <jrubia...@gmail.com> wrote: > > When doing RJS stuff of the form below, I seem to recall unexpected > behavoir where if I had many method calls within that block things > didn't work as expected and variables would not have values I > expected. I know I am not being very specific and I don't have an > example. I am trying to refactor some code where I have alot of code > inside the block and I am affraid I am going to have the same sort of > problem I used to have previously when I had written alot of RJS stuff > previously. > > render :update do |page| > ... > end
I tend to use render :update from within the controller in cases where there are a small number (like 4 max) of method calls. Beyond that, I think it improves readability and testability to move the method calls to an rjs template. Best regards, Bill -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.