I am using a jQuery plugin called Fancy Gallery that often calls images from the images folder within the plugin folder like background:url("../images/fancygallery/arrows_sprite.png"). My question has 2 parts
How should this plugin integrate with my rails 3.1 application? Should the folder be placed inside the vendors/assets folder? The plugin has 3 folders, css, images, js. If I put these in
vendor/assets/stylesheets,vendor/assets/images,vendor/assets/javascripts, the css will surely not be able to locate the images in../imagesfolder since it will no longer exist after asset pipelining is done with it. So where should this be placed?Is there a simple way in which I don't have to go in to my plugin and edit the css everywhere it is loading the images? I do not want to do this every time I update the plugin, there has to be a way I can just drop the plugin folder as is and have it work.
Upon further testing
This is the issue i am running in to. for example, in the CSS, here is a part that loads the arrow background: url('../images/fancygallery/arrows_sprite.png'). Throughout the plugin, all images are referred with a ../images like that. So when loading the plugin when the page loads, this is how it looks for the image http://localhost:3000/images/fancygallery/arrows_sprite.png but the image does not exist there, it exists in the assets/fancygallery/images folder. Is there any way I can make the ../images look in http://localhost:3000/assets/fancygallery/images/ and not http://localhost:3000/images/? Or some other workaround for this that does not require me to alter the plugin code so that I can easily update it later.
Part of the problem is
The plugin css is being loaded in my application.css.SCSS file like this
@import "fancygallery/css/uniform.aristo";
@import "fancygallery/css/jquery.fancygallery";
@import "fancygallery/css/prettyPhoto";
so all images are being relateve to that.