> > Generating JavaScript dynamically with ERb is almost never a good thing > in my experience. Make your JavaScript static by getting the profile_id > from the DOM or a URL parameter. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org
Well, there's some code inside the method that needs to execute first, then change the element on the screen with javascript. using js.erb is the only way I know to do both of those things. I can change the element on the screen with a click function but I don't know how I'd get the method's code to execute as well. -- 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-t...@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.