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.
对于某些 ajax 调用,我想跳过存储会话。我使用设计 gem,何时以及如何指定要排除更新会话的操作?
问候
在控制器中添加:
after_action -> { request.session_options[:skip] = true }
根据这里的评论:
:skip 不会在响应中设置 cookie 也不会更新会话状态