title: Where to override current_user helper method of devise gem
body: <p>How can i override <b>current_user</b> of <b>devise gem. </b>
  Actually I need to add web services for mobile-app.</p>
  
  <p>Currently devise is managing session and 'current_user' for web-application. </p>
  
  <p>Now Mobile app will send user_id to the server.  I need to override current user like this</p>
  
  <pre><code>def current_user
    if params[:user_id].blank?
      current_user
    else
      User.find(params[:user_id])
    end   
  end
  </code></pre>
  
  <p>Should I need to modify devise gem as plugin ? or something else ?<br>
  Kindly explain in detail as I am new in rails. </p>
  
  <p>Kind regards,</p>