问题
I am a newb to RoR and I tried to throughly look this through before coming here for help. I am creating a web app and am using Auth0 for user authentication. The user information is saved on the Auth0 database and that's fine...but I want to create a database on my end of the app that allows the user to favorite a list of products that can be seen only to that specific user...if I'm making any sense.
So far for the dashboard I just have the basic set up where
class DashboardController < SecuredController
def show
@user = session[:userinfo]
end
def destroy
session[:userinfo] = nil if session[:userinfo]
redirect_to root_url
end
end
So nothing is really being done on my end but showing basic information of the user currently logged in.
来源:https://stackoverflow.com/questions/38626438/using-auth0-user-id-for-database