Sorry - just realised I sent this to the ruby list rather than the rails list.

R.

Rob Lally wrote:
> Hi,
> 
> I'm having a problem storing an AR model object in a session. Actually 
> the problem doesn't seem to be related to storing it in a session. The 
> problem occurs when the session is deserialised on the next request.
> 
> When the user logs in I pop a User object (an AR model) into the session 
> and redirect to the homepage. Then I see the following error
> 
> <ActionController::SessionRestoreError: Session contained objects where 
> the class definition wasn't available. Remember to require classes for 
> all objects kept in the session. The session has been deleted. (Original 
> exception: undefined class/module User [ArgumentError])>
> 
> Can anyone shed any light on my problem?
> 
> 
> Thanks,
> 
> R.