I'm trying to get image uploads to work with file_column, and thought I almost had it when I stumbled on a really strange error I can't figure out. No other post here seems to deal with it either.
The create and edit views for my object "Item" (I'm a newbie at ruby/ rails, so pardon my vocab display the uploaded image just fine, but when I go back to the index, the page dies because it tried to invoke picture_relative_path on nil. No idea why the image string suddenly becomes nil, seems to me that it shouldn't be possible... attaching error and code around it. Any help GREATLY appreciated, just holler if any additional info would make it easier to diagnose. Hopefully the hive mind is sharper than my googling
Showing items/index.html.erb where line #14 raised:
You have a nil object when you didn't expect it! The error occurred while evaluating nil.picture_relative_path
Extracted source (around line #14):
11: <tr> 12: <td><%=h item.name %></td> 13: <td><%=h item.category %></td> 14: <td><%= image_tag url_for_file_column("item", "picture", "normal") %></td> 15: <td><%= link_to 'Show', item %></td> 16: <td><%= link_to 'Edit', edit_item_path(item) %></td> 17: <td><%= link_to 'Destroy', item, :confirm => 'Are you sure?', :method => :delete %></td>