[Rails] Image Display Question
Jean-François
jf.web3 at gmail.com
Thu Apr 20 20:14:17 GMT 2006
2006/4/20, Dave Hoefler <dhoefler at gmail.com>:
> I have something odd happening to my image tags when
> displaying an image. Here's what my '<img src>' tags
> are looking like:
>
> <img alt="2-thumb" src="/images/public/uploaded_images/2-
> thumb.jpg?" />
>
> Notice the question mark at the end of the string. I have no idea
> where this
> coming from. Here are the important parts of my code:
I think it comes from that :
(extract of actionpack CHANGELOG)
* Added automated timestamping to AssetTagHelper methods for
stylesheets, javascripts, and images when Action Controller is run
under Rails [DHH]. Example:
image_tag("rails.png") # => '<img alt="Rails"
src="/images/rails.png?1143664135" />'
...to avoid frequent stats (not a problem for most people), you can
set RAILS_ASSET_ID in the ENV to avoid stats:
ENV["RAILS_ASSET_ID"] = "2345"
image_tag("rails.png") # => '<img alt="Rails"
src="/images/rails.png?2345" />'
This can be used by deployment managers to set the asset id by
application revision
-- Jean-François.
--
À la renverse.
More information about the Rails
mailing list