Say I'm inside a JavaScript function, I'd like access to data within the Rails line like this:
var DATA_USED
html = "<%= e开发者_JS百科scape_javascript(render :partial => 'change_date_range', :locals => {:end_date_string => DATA_USED }) %>";
You really should use AJAX (I recommend jQuery) for this. You'll want to have JS send a request back to your Rails server with the JavaScript variable as a param in the request.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论