lib/bpluser/controller.rb
# redirect after login to previous non-login page
# TODO figure out why it doesn't work for Polaris or Facebook logins
redirect after login to previous non-login page
TODO figure out why it doesn't work for Polaris or Facebook logins
redirect after login to previous non - login page TODO figure out why it doesn ' t work for Polaris or Facebook logins
def store_location
      if request.path != "/users/sign_in" &&
         request.path != "/users/sign_up" &&
         request.path != "/users/password" &&
         request.path != "/users/password/new" &&
         request.path != "/users/password/edit" &&
         request.path != "/users/confirmation" &&
         request.path != "/users/sign_out" &&
         !request.fullpath.match(/\/users\/auth\//) &&
         !request.xhr? 
        session[:previous_url] = request.fullpath
      end
    end
def store_location if request . path != "/users/sign_in" && request . path != "/users/sign_up" && request . path != "/users/password" && request . path != "/users/password/new" && request . path != "/users/password/edit" && request . path != "/users/confirmation" && request . path != "/users/sign_out" && ! request . fullpath . match ( / \/ users \/ auth \/ / ) && ! request . xhr? session [ :previous_url ] = request . fullpath end end
redirect after login to previous non-login page
TODO figure out why it doesn't work for Polaris or Facebook logins
redirect after login to previous non - login page TODO figure out why it doesn ' t work for Polaris or Facebook logins
# don't store ajax calls