We help IT Professionals succeed at work.
Get Started

Rails problem with saving an object to session - yields "can't dump File"

Yavor_01126 asked
Last Modified: 2013-11-13
I have a class which uses paperclip.
So it has the has_attached_file in it.

The class is called story and I need an object of it to be saved in the session because of multiple redirects.
Session_store is mem_cache.

Of course we can't store the file in session but I can' get rid of it.

So my question boils down to this.

How can I remove/clear the file that is attached to the Story after I've tried to save it so that when saving fails I can redirect and have the Story in my session?

Loosing the paperclip/file is no problem by the way.

If you have any questions please ask!

Thank you in advance!
Watch Question
This problem has been solved!
Unlock 2 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE