0

I have an older Rails application that was Rails 2.x and I've upgraded to Rails 3.0.12 (Ruby 1.9.3)

After going through the upgrade most of the site is working. However, the current user is simply stored in session (session[:user_id]) Every controller checks that session to authenticate the user before allowing the action to be executed.

コントローラーで data_method="delete" を使用して削除アクションを呼び出すと、セッションがリセットされたように見え、その理由がわかりません (コード内で reset_session が呼び出される場所はありません)。

これは、ブラウザーから (リンクまたは ajax 呼び出しのいずれかから) アクションを呼び出した場合にのみ発生します。仕様でアクションを呼び出すと、期待どおりに動作します。

なぜこれが起こっているのでしょうか?

4

0 に答える 0