Forum: Ruby on Rails file_column in session

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Adam D. (Guest)
on 2006-01-13 22:35
(Received via mailing list)
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
Jason C. (Guest)
on 2006-01-13 22:47
(Received via mailing list)
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
Adam D. (Guest)
on 2006-01-13 23:36
(Received via mailing list)
most helpful, thank you.

adam
This topic is locked and can not be replied to.