adding a script to to a rails application

13 views
Skip to first unread message

Jose Blanco

unread,
Mar 16, 2016, 4:45:08 PM3/16/16
to Ruby on Rails: Talk
I would like for this to be included in the head section of my rails app:

<script type="text/javascript" src="https://abc/embed.js"/>

How can I do this from app/assets/javascripts/application.js  ?

I tried this, but it did not work:
Thank you! Jose

tamouse pontiki

unread,
Mar 17, 2016, 2:00:33 AM3/17/16
to rubyonra...@googlegroups.com
Put it in the application layout instead, in app/views/layouts/application.html.erb
Only use the asset pipeline for assets you have in your app.


Thank you! Jose

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d3f81858-d081-48b0-9e08-9e8cee24d20b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages