rails code within javascript
- by Jesse
I am trying to use some rails code withing a javascript and need to have that rails code be dynamically changed. Here's the line of code:
$(this).replaceWith("<%= escape_javascript(render(:partial => 'shared/products')) %>");
The 'shared/products' is the part I want to change based off information passed earlier in the javascript. How…