I’m trying out this recipe from the Rails Recipes book (the tagging one)
but
I’m also trying to use file_column to handle the uploading of pictures.
Basically I think the problem is I’m not using an instance variable in
the
view’s partial that shows the details of my item. Off of my original
list.rhtml page I have a
<%= render :partial => “detail”, :collection => @recipes %>
then in my details partial i have a
<%= render :partial => “content”, :locals => {:recipe => detail,
:form_id =>
form_id} %>
so in my content partial I’m using local variables.
Now if I just try to add
<%= image_tag url_for_file_column(“recipe”, “image”) %>
I get
You have a nil object when you didn’t expect it! The error occured while
evaluating nil.image_relative_path
I’ve tried a couple of simple ways to use an instance variable but it
hasn’t
worked properly…