[Rails] Re: Missing Image RoutingError = TOO SLOW

2009-01-30 Thread s.ross
Well, you only need to tell if the file exists if you care about that. In dev, you may not. Try something like: def wrapped_image_tag(image_name, options={}) image_name = 'placeholder.png' if `hostname` =~ /local/ image_tag(image_name, options) end You may wind up with a page of placehol

[Rails] Re: Missing Image RoutingError = TOO SLOW

2009-01-29 Thread william.hard...@gmail.com
Ah, definitely thinking along the right lines... then I'd just have to figure out some way to determine if the file actually existed on the machine or not. Which could probably be done, if not super efficiently. I'll keep this in mind as a potential solution, thanks for your idea. If anyone else

[Rails] Re: Missing Image RoutingError = TOO SLOW

2009-01-27 Thread s.ross
Write a helper that wraps image_tag that checks to see whether you are on your production box. Iff you are on the production box, then image_tag it is, otherwise, some placeholder image guaranteed to be local in your images dir. Will that work? On Jan 27, 2009, at 10:27 PM, william.hard...