Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 rails 3.2 中实现 cookie 检测的最佳方法是什么?
如果 cookie 被禁用,我想将用户重定向到特殊操作。
您可以检查 rails 自动存储的 session_id
redirect_to root_path unless cookies["_session_id"]