Displaying 2 results from an estimated 2 matches for "attachment_file_size".
2009 Sep 03
12
paperclip is not saving the files
...:thumb => "100x100>" }
and i have db migration as
class AddAttachmentToPolicies < ActiveRecord::Migration
def self.up
add_column :policies, :attachment_file_name, :string
add_column :policies, :attachment_content_type, :string
add_column :policies, :attachment_file_size, :integer
end
def self.down
remove_column :policies, :attachment_file_name
remove_column :policies, :attachment_content_type
remove_column :policies, :attachment_file_size
end
end
and I have that plugin as well
but its not saving the files and I''m getting values as n...
2009 Aug 07
2
paperclip model fails while when updating with no attachment
...the following error:
"ActiveRecord::RecordInvalid in ItemsController#update
Validation failed: Attachment file name can''t be blank, Attachment file
size can''t be blank"
There are validation errors from the Assets Model for the presence of
:attachment_file_name and :attachment_file_size.
I have the below code in my item model:
[code]
after_save create_or_update_assets!
def create_or_update_assets!
# return if there are no asset_attributes
return true if asset_attributes.nil? || asset_attributes.empty?
# pull the attributes from the instance variable
asset_a...