On Nov 21, 2011, at 11:51 AM, Jeremy Woertink wrote:

> hmm. Ok, in my app that I'm upgrading, I can't do require_tree . because 
> of the 150 different stylesheets used currently. I should just be able 
> to *= require jquery-ui1.8.13.custom, right?

Yep, that should work fine.

> Now what about the whole 
> thing of 3rd party stuff going into vendor/assets ?

My thought on this was, jquery-ui itself is a 3rd-party vendor asset.  However, 
custom themes that I generate are more questionable; I chose to put those under 
my app directory instead of vendor.  However, you should be able to make it 
work either way.

> How do you deal with 3rd party css that look for ../images/whatever.png 
> in background-image? Those are all failing as well.

Remember that when your assets are compiled, the javascripts, images, and 
stylesheets folders in your app all get dumped into a single /public/assets 
folder. If you have a subfolder in one of those, like images/images, then the 
subfolder will get added to your assets folder.

Armed with that knowledge, I've found you can usually figure out how to arrange 
your assets in order to get those images picked up ok.

> 
> Thanks for the suggestion on throwing the images folder into the other 
> images folder. I'll try that. Not too harsh of a compromise :)

I only have it that way because the theme css is coding paths to images as 
"images/...", so if I want to avoid modifying code they need to go in a 
subfolder like that.

As another approach, if you're using say fancybox, there is a gem at 
https://github.com/hecticjeff/fancybox-rails that you could use; this gem makes 
some changes in the fancybox script in order to play nice with the asset 
pipeline, but it's not something that's likely to change often and thus I use 
it to keep my app's asset directories a little cleaner.

Greg

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to