# Resource Image clashes with image\_tag

**URL:** <https://www.ruby-forum.com/t/resource-image-clashes-with-image-tag/118538>\
**Category:** Rails\
**Created:** [October 28, 2007, 11:05am UTC](https://www.ruby-forum.com/t/resource-image-clashes-with-image-tag/118538 "2007-10-28T11:05:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ab097/32.png) [@bartz](https://www.ruby-forum.com/u/bartz)\
**Post date:** [October 28, 2007, 11:05am UTC](https://www.ruby-forum.com/t/resource-image-clashes-with-image-tag/118538/1 "2007-10-28T11:05:40Z")

</div>

Hey gang,

I have a model Image, generated through scaffold\_resource. But when I  
use image\_tag(foo) in my views, I get the following error:

image\_url failed to generate from {:action=\>“show”, :id=\>“foo”,  
:controller=\>“images”}, expected: {:action=\>“show”,  
:controller=\>“images”}, diff: {:id=\>“foo”}

Looks like image\_tag clashes with image\_path somewhere, somehow…  
Obviously, I want to use the image\_tag helper, not some named route  
here. Any ideas how I can keep my model named Image, and still use the  
image\_tag helper?

thanks!

---

<div class="post-metadata">

**Author:** ![bartz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ab097/32.png) [@bartz](https://www.ruby-forum.com/u/bartz)\
**Post date:** [October 28, 2007, 12:19pm UTC](https://www.ruby-forum.com/t/resource-image-clashes-with-image-tag/118538/2 "2007-10-28T12:19:59Z")

</div>

there has been a recent update to edge which removes this conflict. I  
have been able to rename my asset model to image and it works well.

Bart Z. wrote:

> Hey gang,
> 
> I have a model Image, generated through scaffold\_resource. But when I  
> use image\_tag(foo) in my views, I get the following error:
> 
> image\_url failed to generate from {:action=\>“show”, :id=\>“foo”,  
> :controller=\>“images”}, expected: {:action=\>“show”,  
> :controller=\>“images”}, diff: {:id=\>“foo”}
> 
> Looks like image\_tag clashes with image\_path somewhere, somehow…  
> Obviously, I want to use the image\_tag helper, not some named route  
> here. Any ideas how I can keep my model named Image, and still use the  
> image\_tag helper?
> 
> thanks!
