title: Ruby on rails access Devise.sign_in_after_reset_password in a controller
body: <p>Im overriding Devise's <code>Devise::PasswordsController</code>, so i can use it as a RESTful web service. For that, i've overridden all four methods (<code>new</code>, <code>create</code>, <code>edit</code> and <code>update</code>), based in devise's original <a href="https://github.com/plataformatec/devise/blob/master/app/controllers/devise/passwords_controller.rb" rel="nofollow"><code>Devise::PasswordsController</code> class</a>. It's been straight forward except for the <code>update</code> method, which uses a devise attribute called <code>Devise.sign_in_after_reset_password</code>. I've found that it is defined in the <a href="https://github.com/plataformatec/devise/blob/master/lib/devise.rb" rel="nofollow">library module</a>, but when I try to access it, i get the following error:</p>
  
  <pre><code>NoMethodError in Api::V1::PasswordsController#update
  
  undefined method `sign_in_after_reset_password' for Devise:Module
  
  Extracted source (around line #37):
  36    resource.unlock_access! if unlockable?(resource)
  37    if Devise.sign_in_after_reset_password
  38      flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
  39      set_flash_message(:notice, flash_message) if is_flashing_format?
  40      sign_in(resource_name, resource)
  </code></pre>
  
  <p>So far, I tried to <code>require 'devise'</code>, but it didn't work. I googled it for a while, but didn't find anything either. Im kind of new to ruby and to ruby on rails, so I don't really know where to look. Any help would be very appreciated. Im using <code>RoR 4.2.1</code> and <code>Ruby 2.2.1 (2015-02-26)</code></p>