Thanks szymek for putting me on track. What I did was re-intstall the
file_column plug-in but I still got the same error so I added @recipe recipe and
then then error changed to something about nil.first. So I added
a
rescue "no image"
to the end of my image_tag like so
<%= image_tag url_for_file_column("recipe", "image")
rescue "none" %>
and that seems to work. Is there anything wrong with doing things this way?
>
> Message: 4
> Date: Sat, 22 Apr 2006 10:56:20 +0200
> From: szymek <g0nzo@o2.pl>.
> Subject: [Rails] Re: using file_column
> To: rails@lists.rubyonrails.org
> Message-ID: <eaac219fcba4ea4e397503fd1d7bb3f5@ruby-forum.com>
> Content-Type: text/plain; charset=utf-8
>
> You could use latest (svn) version of file_column plugin, which is
> supposed to work with non-instance variables or just write "@recipe
> recipe" before <%= image_tag url_for...
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
> ------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060422/6df61946/attachment.html