My DB table has a column that can contain a very big amount of data.
I do not want this data to be part of the corresponding rails object (model).
How do I tell in the model that I do not want to store this field in memory ?
Initially this comes from the fact that I have a session bigger than 4k and rails raises a ActionController::Session::CookieStore::CookieOverflow exception.
Thanks for your help,
Mickael.
You’d have to specify the columns explicitly via the find-option
:select.However, storing models in the session is discouraged. How about storing just the object-id in the session, and holding the Model-Object itself in
Rails.cache?