When I use render_to_string on a javascript file that has:
//= require tree .
Then that line stays there and it doesn’t render the other js files that are in the folder.
Here is how I am using render_to_string:
tt = render_to_string :file => "app/assets/javascripts/tasks/#{task.title}/thetask.js", :layout => false
What other options do I need in there to make it parse the //= require tree . and make the file into a string?
Thanks.
I took a different route since I couldn’t do what I wanted. I ended up just using JSON and storing two files in the JSON and sent it over to the client.
That solution works for me.