title: after_sign_in_path_for
body: <p>I use <code>devise</code> in my application.</p>
  
  <p>I want to pop-up a welcome message while the user login.</p>
  
  <p>so in my <code>application_controller.erb</code> I defined:</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    protect_from_forgery
    before_filter :authenticate_user!
  
    def after_sign_in_path_for(user)
      alert('Welcome!')
    end
  
    def after_sign_out_path_for(user)
      new_user_session_path
    end
  end
  </code></pre>
  
  <p>when I tried to sign-in to my app, I got an error:</p>
  
  <pre><code>ArgumentError in Devise::SessionsController#create
  
  wrong number of arguments (1 for 0)
  Rails.root: /home/alon/alon/todolist
  
  Application Trace | Framework Trace | Full Trace
  app/controllers/application_controller.rb:14:in `after_sign_in_path_for'
  </code></pre>