It sounds like you're rendering show.html.erb
from your root_url
. Instead of doing that, you could have just rendered the show
action and your view would have populated correctly.
The reason your variables are not available in the view is because you are doing a redirect. When you do a redirect none of the instance variables are available in the redirected url.
So, instead of redirecting, you could just render the show
action as follows:
def create
@c_user = User.from_omniauth(env["omniauth.auth"])
@c_name = @c_user.name
@c_email = @c_user.email
@c_website = @c_user.website
logger.debug("current user has name #{@c_user.name}")
flash[:notice] = "Signed in as #{@c_name} #{@c_email}!"
render :show
end