File_column in session


#1

is it possible to store a field of type file_column in the session?
Rails crashes on me every time i try to do something like the
following:

@session[:newpost] = @params[:post]

however if i assign each field of @params[:post[ except for
@params[:post][“image”] i have no problems. Is there something that
should be done to allow the file in the session?

thanks
adam


#2

Adam D. <straightflush@…> writes:

thanks
adam

in application.rb you need to make sure the model is specified for any
models
you want to store in session.

class ApplicationController < ActionController:::Base
model :file_column
end


#3

most helpful, thank you.

adam