search for: attachment_error

Displaying 1 result from an estimated 1 matches for "attachment_error".

2006 Jul 03
0
Multiple File Upload
Hello together, I developed a file upload in my application like this (files uploaded belong to a project): project_controller.rb: ---------------------- def upload_attachment project = Project.find(@params[:id]) begin project.attachments.create(params[:attachment]) rescue flash[:attachment_error] = "Error at Upload" end redirect_to :action => "edit_project", :id => project end attachment_model: ----------------- def attachment=(attachment_field) self.name = base_part_of(attachment_field.original_filename) self.content_type = attachment_field.content_type.chom...