I have created an html file by using render_to_string in a controller and send_data to send the html file to the user. That works great and the file I get back matches the html I see when I right click and view page source in my browser. However, in my html file there are links to css files and .js files that don't exist in my app/assets folder.
For example, there is a link to application.css in the html file but there is only application.css.scss in the app/assets folder. Or another example; lightbox.css.erb instead of lightbox.css.
Also, some of the paths in the html are wrong, for example images are located in app/assets/images, but the html is looking in app/assets. The pathing is not an issue since I can just edit the generated html with nokogiri, but I am curious as to why they are different.
This is pretty much exactly what I want to do rails: emulate "Save page as" behaviour
Except that I'm getting my html a different way and for whatever reason I can't find the assets I'm looking for. The html appears valid as I indicated earlier, and opening the file will display text from the html but won't display any images or assets until I change the link paths.
From what I've read, rails will transform scss to css and render erb files to js or html. I can't find these files anywhere in my directories, though. How can I generate the files that I need in order to display my static html file independently from the rails app?
I'm using Rails 3.2.2 with jruby 1.6.7 (ruby 1.9.2)