# Image Display Question

**URL:** <https://www.ruby-forum.com/t/image-display-question/58362>\
**Category:** Rails\
**Created:** [April 20, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/image-display-question/58362 "2006-04-20T22:05:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/85e7bf/32.png) [@daveh](https://www.ruby-forum.com/u/daveh)\
**Post date:** [April 20, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/image-display-question/58362/1 "2006-04-20T22:05:04Z")

</div>

Hello there,

I have something odd happening to my image tags when displaying an  
image.  
Here’s what my ‘ ![]()’ tags are looking like:

![2-thumb](https://test.ruby-forum.com/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:

In the ‘image’ model:

DIRECTORY = ‘public/uploaded\_images’  
def to\_url  
return DIRECTORY + “/#{self.id}-thumb.jpg”  
end

In the images\_controller:

def list  
@images = Image.find :all, :order=\>“id DESC”  
end

In the list.rhtml view:

 \<%= render :partial=\>'images', :collection=\> @images %\>

…and in the partial:  
\<%= image\_tag(images.to\_url) %\>

It’s nothing fancy, but it’s driving me nuts trying to figure out where  
that  
darn question mark is coming from.

Any ideas on this?

Thank you!  
Dave hoefler

---

<div class="post-metadata">

**Author:** ![daveh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/85e7bf/32.png) [@daveh](https://www.ruby-forum.com/u/daveh)\
**Post date:** [April 20, 2006, 10:17pm UTC](https://www.ruby-forum.com/t/image-display-question/58362/2 "2006-04-20T22:17:18Z")

</div>

2006/4/20, Dave H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I have something odd happening to my image tags when  
> displaying an image. Here’s what my ‘ ![]()’ tags  
> are looking like:
> 
> ![2-thumb](https://www.ruby-forum.com/images/public/uploaded_images/2-%20thumb.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:

---

<div class="post-metadata">

**Author:** ![daveh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/85e7bf/32.png) [@daveh](https://www.ruby-forum.com/u/daveh)\
**Post date:** [April 20, 2006, 10:26pm UTC](https://www.ruby-forum.com/t/image-display-question/58362/3 "2006-04-20T22:26:33Z")

</div>

Thanks Jean. That clears it up. 😉

-Dave
