I am developing an application with Rails 3.0.3.
I got the message "Can not dump file" in the following code.
if @post.update_attributes params[:post] redirect_to post_path(@post)
After googling, I added 2 lines to fix this.
if @post.update_attributes params[:post] params[:post][:photos_attributes] = nil params[:post][:attachments_attributes] = nil redirect_to post_path(@post)
Now the error has disappeared. But I do not understand why the error occurred and how it is fixed. I use active_record for session storage and this caused an error because the file could not be saved to the database. But why is redirect_to trying to store the file in the session?
Thanks.
Sam
source share