导轨:如何保存在会话中的大阵? (ActionDispatch ::饼干:: CookieOverflow) [英] rails: how to save a big array in session? (ActionDispatch::Cookies::CookieOverflow)
本文介绍了导轨:如何保存在会话中的大阵? (ActionDispatch ::饼干:: CookieOverflow)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试着去挽救一个数组比4 KB更大的会话。
Im trying to save a array in a session which is much bigger than 4 KB.
在这种情况下,:ActionDispatch ::饼干:: CookieOverflow错误occures
In this case the: ActionDispatch::Cookies::CookieOverflow Error occures.
没有任何人有一个提示如何保存在一个会话一个更大的阵列?它保存到数据库是不是我想要的。
Does anybody have a hint how to save a bigger array in a session? Saving it to the db is not what I want.
谢谢,
马库斯
Thanks, Markus
推荐答案
您需要更改session_store并没有使用cookie_store。您可以通过例如使用active_record_store。
You need change your session_store and don't use the cookie_store. You can use the active_record_store by example.
这篇关于导轨:如何保存在会话中的大阵? (ActionDispatch ::饼干:: CookieOverflow)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文