Hello...hope someone can help. I have a has_many through relationship
set up but am not able to get it to work properly. As you can see I have
users, roles and a user_roles table. To verify things are working I
created an 'intro' page with associated action in an 'admin' controller.
The action simply finds the name of the user that's logged in and should
display their role name.
@user = User.find(session[:user]).roles.name
The trouble is it just displays the word 'Role' on the intro page not
the users role name. If I change it to
@user = User.find(session[:user]).username
it will display the username properly, anyone know why this is
happening?