Use Jquery - document.ready() to load page specific javascript in Rails App

Yesterday I was working on one of our portal (It's in Ruby on Rails and we have used quite alot jquery as well). Was integrating a nice Photo Gallery plugin on one of the page. Applcation is having many pages. Every page has some different behaviour and we have different jquery calls for that as per need. For a performant application, we always want to avoid any unwanted calls to different methdods/functions. In my case, as I mentioned earlier I wanted to show Photo Gallery on a page and photo gallery loads as soon as page is loaded. Gallery

Rails 4 has asset digest issues

For those upgrading to OR using Rails 4 Please have a look at the github thread https://github.com/rails/sprockets-rails/issues/49 Proposed solution : https://github.com/alexspeller/non-stupid-digest-assets OR https://github.com/rails/sprockets-rails/issues/49#issuecomment-25946196