I’m using Devise and I need for an authenticated user to land on the profile page for that user.
the url path looks like this…www.website.com/profile/1
CURRENTLY the authenticated user lands here
Here is a snippet from my routes.rb file of the offending code.
authenticated :user do
root :to => 'home#index' # TODO direct to profile page
end
How do I change the above so the user is directed to …www.website.com/profile/1
Note: here is the output for rake routes for profile
profiles GET /profiles(.:format) profiles#index
POST /profiles(.:format) profiles#create
new_profile GET /profiles/new(.:format) profiles#new
edit_profile GET /profiles/:id/edit(.:format) profiles#edit
profile GET /profiles/:id(.:format) profiles#show
PUT /profiles/:id(.:format) profiles#update
DELETE /profiles/:id(.:format) profiles#destroy
You can overwrite the Devise method
after_sign_in_path_for: