I\'m wondering what the best practice is for passing variables to JavaScript functions in a rails view. Right now I\'m doing something like:
<% content_f
There's a technique called "unobtrusive javascript". Here's a Railscast about it: link text . It works both with prototype an jQuery. There are also plugins that can help simplify some of the tasks described in the article.