Yeaaaa ... but this means having a lot of additional load as there a plenty people saving stories right now... and this would mean like not double but triple the savings.
I think as far as I've experienced it that for one page redirect putting something in session(or flash or instance variable) isn't a big deal and actually saves time and a lot of headaches.
I have a clue on where the problem with paperclip might be. But please if you know tell me :)
Main Topics
Browse All Topics





by: raasdnilPosted on 2009-08-31 at 17:36:54ID: 25227681
Generally, saving an entire object to the session is a bad idea. You can have a look at a rails cast on this subject.
= story.id
t_story_id ])
So to get around the problem, you tend to store only a reference to the object in your session.
Something like this:
def update
story = Story.find(params[:id])
story.text = params[:story][:text]
session[:current_story_id]
redirect_to some_other_action_path
end
def some_other_action
story = Story.find(session[:curren
# do stuff to story
end
Hope that helps
Mikel