As a newcomer to Ruby on Rails, I find myself struggling to grasp the larger concept. Any assistance you can offer would be greatly appreciated.
Within my application.html.haml file, I utilize =yield to pull content from ranked.html.haml. Currently, this content has access to the @featured_image rails variable.
My goal is to access the @featured_image rails variable upon page load so that I can preload that image and subsequent images with specific IDs.
Unfortunately, my window.onload = function() in application.html.haml does not have access to @featured_image...any suggestions on how to accomplish this?
Thank you in advance!