Reputation: 3330
Hi I'm making a Widget which display a page from rails application in Iframe. Since the remote page was developed in rails, On rendering single page on Iframe, It loads all the JS and CSS file so page on iFrame takes too much time to load.
I was trying to use layout: false
while rendering the page but it doesn't load any of its JS and CSS file.
Is there any way to include specific JS and CSS file in rails view?
Upvotes: 0
Views: 411
Reputation: 3803
On a page you can write to include stylesheet as
<%= stylesheet_link_tag 'filename' %>
## If your file reside under any folder then you have to write 'foldername/filename'
and you can include javascript file as:
<%= javascript_include_tag 'filename' %>
Upvotes: 2