Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Devise 1.4.1 (27 June 2011) changed the default behavior for sign out requests:</p> <p><a href="https://github.com/plataformatec/devise/commit/adb127bb3e3b334cba903db2c21710e8c41c2b40" rel="noreferrer">https://github.com/plataformatec/devise/commit/adb127bb3e3b334cba903db2c21710e8c41c2b40</a></p> <p>Jose Valim explained why: "GET requests should not change the state of the server. When sign out is a GET request, CSRF can be used to sign you out automatically and things that preload links can eventually sign you out by mistake as well."</p> <p>Cucumber wants to test GET requests not DELETE requests for destroy_user_session_path. If you intend to use Cucumber with Devise, change the Devise default from DELETE to GET for the Rails test environment only with this change to <code>config/initializers/devise.rb</code>:</p> <blockquote> <p>config.sign_out_via = Rails.env.test? ? :get : :delete</p> </blockquote> <p>Don't try to tweak the routes.rb file to make the fix. It isn't necessary. If you're not going to use Cucumber, leave Devise's new default (DELETE) in place.</p> <p>The example source code here:</p> <blockquote> <p><a href="https://github.com/RailsApps/rails3-devise-rspec-cucumber" rel="noreferrer">https://github.com/RailsApps/rails3-devise-rspec-cucumber</a></p> </blockquote> <p>now includes the change to the Devise initializer for Cucumber.</p> <p>The application template here:</p> <blockquote> <p><a href="https://github.com/RailsApps/rails3-application-templates" rel="noreferrer">https://github.com/RailsApps/rails3-application-templates</a></p> </blockquote> <p>now detects the collision between Devise and Cucumber and alters the Devise initializer as needed.</p> <p>These changes were tested with with Rails 3.1.0.rc4 but the behavior should be the same with Rails 3.0.9. Please add comments here if the issue is unresolved or if you have more information.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload