title: How do I call the fully qualified Devise sign_in method?
body: <p>How do I explicitely call Devise sign_in? I already have a method in my controller called <code>sign_in</code>.</p>
  
  <p>I tried </p>
  
  <pre><code>require 'devise/controllers/sign_in_out'
    Devise::Controllers::SignInOut.sign_in @user
  
  cannot load such file -- devise/controllers/sign_in_out
  </code></pre>
  
  <p>and</p>
  
  <pre><code>include Devise::Controllers::Helpers
    Devise::Controllers::Helpers.sign_in @user
  
  undefined method `sign_in' for Devise::Controllers::Helpers:Module
  </code></pre>
  
  <p>but neither worked.</p>
  
  <p>I also tried</p>
  
  <pre><code>alias_method :devise_sign_in, :sign_in # keep hold of the Devise sign_in method before we overwrite it.
    devise_sign_in @user
  </code></pre>
  
  <p>which worked in the browser but when I ran <code>rspec</code> it gave this error:</p>
  
  <blockquote>
    <p>/rsync/BK-Development/app/controllers/community_members_controller.rb:5:in <code>alias_method': undefined method</code>sign_in' for class <code>CommunityMembersController' (NameError)
                from /rsync/BK-Development/app/controllers/community_members_controller.rb:5:in</code>'</p>
  </blockquote>
  
  <p>I found the source of the method here:</p>
  
  <p><a href="https://github.com/plataformatec/devise/blob/v2.2/lib/devise/controllers/helpers.rb" rel="noreferrer">https://github.com/plataformatec/devise/blob/v2.2/lib/devise/controllers/helpers.rb</a></p>
  
  <p>Devise version 2.2.8</p>