In one of my views, I need to do something when the page loads (load google maps JS and then initialize some of my things) I can, of course, insert this bit into my haml / erb template, but is there any way UJS can do it right ?
-content_for :head do = google_loader_tag
I really thought UJS does not mean mixing Javascript and html templates together, but here I see no other choice. What do you think?
source share