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
- content_for :javascripts_vars do = "var costs_data = #{@records[:cost_mode][:data].to_json}".html_safe = "var graph_data = #{@records[:cost_mode][:graph].to_json}".html_safe