Debugging? Its saving the image, however the values in the database are NULL

5 views
Skip to first unread message

John

unread,
Sep 26, 2008, 11:20:43 AM9/26/08
to Paperclip Plugin
Hello All,

Paperclip is saving the images, however its not saving the file_name,
type, and size. Whats the best way to debug to see why this is
happening? I do not see any errors in the logs below other then its
not updating those fields:

Processing AttachmentsController#update (for 192.168.0.24 at
2008-09-26 11:25:48) [PUT]
Session ID: 8faafc1a90eaf2aa72d5ab8553016c4c
Parameters: {"commit"=>"Create",
"attachment"=>{"thefile"=>#<ActionController::UploadedStringIO:
0x2aaaac401df8>, "user_id"=>"1", "active"=>"1"}, "action"=>"update",
"_method"=>"put",
"authenticity_token"=>"09ff2e2cc07a54d6b8d4d4816394d1d02ddec63e",
"id"=>"3", "controller"=>"attachments"}
Attachment Columns (0.000545) SHOW FIELDS FROM `attachments`
Attachment Load (0.000039) SELECT * FROM `attachments` WHERE
(`attachments`.`id` = 3)
SQL (0.000036) BEGIN
Attachment Update (0.000170) UPDATE `attachments` SET `updated_at`
= '2008-09-26 15:25:48' WHERE `id` = 3

Thanks
- John

Jonathan Yurek

unread,
Sep 26, 2008, 1:55:40 PM9/26/08
to papercli...@googlegroups.com
Hi,

So the images are being stored on the filesystem but the data is not
being recorded into the database? Can you please post your controller
action where the assignment is taking place, as well as the model?

Thanks.

--
Jonathan Yurek, Founder and CTO
thoughtbot, inc.
organic brains. digital solutions.

617.482.1300 x114
http://www.thoughtbot.com/

Reply all
Reply to author
Forward
0 new messages