title: devise change redirect after update
body: <p>I've tried the code on Devise's github.  In my application controller, i have:</p>
  
  <pre><code>after_filter :store_location
  
  def store_location
    # store last url - this is needed for post-login redirect to whatever the user last visited.
    if (request.fullpath != "/users/sign_in" &amp;&amp;
        request.fullpath != "/users/sign_up" &amp;&amp;
        request.fullpath != "/users/password" ) 
      session[:previous_url] = request.fullpath 
      puts 'stores location'
    end
  end
  
  def after_update_path_for(resource)
    session[:previous_url] || dashboard_path
    puts 'after update'
  end
  </code></pre>
  
  <p>When I check my server, the puts statement from the store_location method appears, but the puts statement from after_update_path_for does not.  How do I get the after_update_redirect to work?</p>
  
  <p>Here is what devise says to do, but it isn't working:</p>
  
  <p><a href="https://github.com/plataformatec/devise/wiki/How-To:-Redirect-back-to-current-page-after-sign-in,-sign-out,-sign-up,-update" rel="nofollow">https://github.com/plataformatec/devise/wiki/How-To:-Redirect-back-to-current-page-after-sign-in,-sign-out,-sign-up,-update</a></p>