Wait, I think I fixed it! Nevermind, XD
-Ryan
On Feb 10, 7:59 pm, kopf1988
<kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''m trying
>
> <%= link_to image_tag("#{gallery.link_to}"),
gallery_path(gallery)
> unless gallery.thumbnail_id == 0%>
>
> and get the error:
>
> ActionView::TemplateError (undefined method `image_tag'' for
#<Gallery:
> 0xb7083be4>) on line #23 of app/views/users/index.rhtml
>
> This is my definition of link_to
> def link_to
> unless self.thumbnail_id == 0
> picture = Picture.find(self.thumbnail_id)
> path = picture.public_filename(:big_thumb)
> return "#{path}"
> else
> return ""
> end
> end
>
> Any idea about that error?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---