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?
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!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.