I set up a Ruby on Rails simple Devise Authentication on my website. Then I added in Jquery to make it look nicer but whenever I sign in or out the URL at the top doesn't update but the rest of the page does. It still says "http://localhost:3000/users/sign_in"
when I click the refresh button it then says "http://localhost:3000/dashboard"
like it's supposed to.
my routes.rb file is simple:
Devise::Application.routes.draw do
devise_for :users
resources :dashboard
root to: "home#index"
get "sign_in" => "users#sign_in"
end
Like I said this also happens when I click sign out from the dashboard. it redirects to home#index but the URL doesn't say home/index or / it says /users/sign_out/
I thought this might have started happening after I set up Jquery I didn't notice it before, so I'm not sure.
Last thing, when I sign in and I see my dashboard then I click on the sign out button, there is a jquery popup that flashes across the screen and says "error on page" so I have to refresh so the URL is correct then I can click links and it behaves correctly.
It's as if half of the program thinks I'm signed in and the other half doesn't realize it yet.
any thoughts?