thoughtbot/paperclip — Issue #740: getting "[paperclip] Saving attachments." on the log but actually nothing is saved
Author: qwertoyo
Created: 2012-02-14 21:51:33+00:00
State: open

I am new to paperclip, sorry in advance if this has a simple fix mentioned somewhere (though i've spent the last hours searching for it).

I am developing on OsX, rails 3.2, ruby 1.8.7, paperclip 2.6

I have a model hierarchy:

```ruby
class QuestDescription < ActiveRecord::Base
end
```

```ruby
class ImageDescription < QuestDescription
has_attached_file :img
end
```
, I'm using STI, schema information is

== Schema Information

Table name: quest_descriptions

id :integer not null, primary key
type :string(255)
created_at :datetime not null
updated_at :datetime not null
img_file_name :string(255)
img_content_type :string(255)
img_file_size :integer
img_updated_at :datetime

but when i create a new ImageDescription, paperclip doesn't save the image anywhere, my "img_*" columns are set to nil, even if in the log (development.log) i get "[paperclip] Saving attachments."

part of the log:

Started POST "/image_descriptions" for 127.0.0.1 at Tue Feb 14 22:19:02 +0100 2012
Processing by ImageDescriptionsController#create as HTML
Parameters: {"commit"=>"Create Image description", "image_description"=>{"img"=>#, @headers="Content-Disposition: form-data; name=\"image_description[img]\"; filename=\"1328372398475.png\"\r\nContent-Type: image/png\r\n", @content_type="image/png", @original_filename="1328372398475.png">}, "authenticity_token"=>"aiTTcMyM4FCZsS3LWwd8suzRCcRUTFE2t1stL4QszwQ=", "utf8"=>"\342\234\223"}
(0.1ms) begin transaction
SQL (0.6ms) INSERT INTO "quest_descriptions" ("created_at", "img_content_type", "img_file_name", "img_file_size", "img_updated_at", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 14 Feb 2012 21:19:02 UTC +00:00], ["img_content_type", nil], ["img_file_name", nil], ["img_file_size", nil], ["img_updated_at", nil], ["type", "ImageDescription"], ["updated_at", Tue, 14 Feb 2012 21:19:02 UTC +00:00]]
[paperclip] Saving attachments.
(2.2ms) commit transaction