On 5 April 2011 17:58, Edward Stembler <li...@ruby-forum.com> wrote: > Colin Law wrote in post #991056: >> On 5 April 2011 16:07, Edward Stembler <li...@ruby-forum.com> wrote: >> So, if I understand correctly, you don't want to call the helper from >> javascript, you want to fire the AJAX call from javascript and call >> the helper from the view rendered by the AJAX action on the server, to >> update the appropriate div on the page. > > Yes, I'm not sure what the proper procedure is, or the best practice. > If I cannot make the call from javascript to my helper function, then do > I create a .js.erb partial view? And if so, what does the pattern look > like?
The helper is a ruby file returning html, right? In that case you just call it from the html.erb file rendered by the AJAX action. js doesn't come into it. Colin -- 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.