views:

11

answers:

1

Up to the end of December 2009 everything worked fine, so i assume that after some upgrades on servers (Ubuntu 8.10 and second Ubuntu 9.10) something stopped working.

Model: class Product < ActiveRecord::Base belongs_to :category file_column :thumbnail, :magick => { :geometry => "150x100>" }

there is of course table 'products' in database, and it has column 'thumbnail'

what's interesting that File actually is uploaded to server, it goes to the /tmp directory under RackMultipartXXXX-0 name, and it is unmodified image.

The problem is, that then this file is not moved to 'tmp' dir under RAILS_ROOT/public/product/ nor the 'XX' (where xx means ID of a product) under public/product also.

i don't know what to do, i spend few HOURS trying different versions of file_column, also trying to make new, test rails application only from scaffold, but then, in this new application problem was the same

A: 

ok now i know what was wrong, so maybe it'll help also to someone

it was input tag format

i used <%= file_column_field @product, "thumbnail") %> and it seemd to work at the beginning, but stopped later (maybe i upgraded some libs in my systems)

now i changed it to:

<%= file_column_field("product", "thumbnail") %>

and it works fine

Yanaek