On Apr 13, 2013, at 10:40 AM, deepak wrote: > Thanks Walter. > > So in your opinion it is always good to write css without folder prefixes. Am > I getting you right here?
I'd never done that until this week, but then I am extremely late to the asset pipeline party. I have always written mine with the ../images prefix, because that was what you needed in the public folder. But when I tried doing that, and discovered it didn't work, I just bailed and put the reference in without the prefix and discovered that it worked fine that way, without any need for the asset_path helper and css.erb or anything else. Walter > > -deepak > > On Saturday, April 13, 2013 7:40:36 PM UTC+5:30, Walter Lee Davis wrote: > > On Apr 13, 2013, at 7:24 AM, deepak wrote: > > > Originally posted here: > > http://stackoverflow.com/questions/15986969/where-to-put-plugin-images-in-rails-application > > > > > > We use handful of plugins in our Rails application(Rails 3.2.1). As we > > already know that we should keep all app images app/assets/images folder > > and css in app/assets/stylesheets. This is what we follow. > > > > However some plugins use images and keep them in parallel to CSS > > file.(images and CSS in same folder/level) > > > > So my question is: (We use Asset Pipeline) > > > > • Is it a good practice to keep images of plugin in parallel to CSS > > file? (I am hoping it's good thing) > > • If not, then developer has to change the image paths in entire > > css file (if putting plugin images inapp/assets/images), Which I think is > > not helpful for future in case you plan to upgrade those plugins. > > Thanks. > > > > > > You might want to put these in the app/vendor/plugin_name/assets folder tree, > so you can keep them separate from your application's own code. If these > stylesheets are written with "awareness" of a folder hierarchy, like maybe > with ../images/icon.png style references to images, then you may have trouble > with the asset pipeline. I just ran into that in a project here, and had to > give up and let the "magic" work by removing all prefixes. Once I did that, > and just referenced url(icon.png) in my CSS, everything just worked. > (icon.png was in the app/assets/images folder, the stylesheet referencing it > was in the app/assets/stylesheets folder.) > > Walter > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/rubyonrails-talk/-/OMfFgRvVr1EJ. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/U3G23LMF4dcJ. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

