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!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
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 Zonneveld 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!-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---