89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# File 'app/controllers/file_attachments_controller.rb', line 89
def update
@file_attachment = FileAttachment.find(params[:id])
respond_to do |format|
if @file_attachment.update_attributes(params[:file_attachment])
format.html do
flash[:notice] = "Updated File: #{@file_attachment.name}"
redirect_to_index_or_attachable
end
else
format.html do
flash.now[:warning] = "The description could not be saved, please try again."
render :edit
end
end
format.js
end
end
|