I am working on integrating my pre existing website into a RoR framework. So far so good, however I have come to a problem when trying to get fancybox to work.
Simply put I am unsure how to link to the image files and have tried all kind of different variations. For example:
<a class="fancybox-image" href="image.jpg"><div class="call-to-action-section" style="margin-top: 5px;">See more</div></a>
This is a snippet of code from my html – the href within the anchor tag represents the image that I would like to be loaded into fancybox when the button is clicked, however an error message is given which tells me that the image cannot be found.
Are there any particular prefixes needed on the href?
Put your image into the
assets/images-directory and then you have to reference the image via theimage_path-helper: