On 9 October 2015 at 01:20, Greg Bressler <[email protected]> wrote:
> I am relatively new to this and completely lost.  I'm trying to make a
> user's profile page.  If the user is an admin, they can see all the
> users, as well as access and edit/update each user's profile page.
>
> I finally got it to work...but when I logged in as a user I received
> several errors which can be noted in the accompanying jpgs.

Please don't post images, copy/paste the error here from the server
terminal window (which is often more informative than the browser
display).

>
> The first jpg is the url that I am assuming the user will go to for
> their profile page.

Where did you get that code for application_controller?  It is not
correct.  Go back to wherever you got it from and check it carefully.
I imagine PRESENT? should be present?

>
> The second jpg (User-Index) is the error I get when I try to access the
> index page as a non-admin.

As the error says, @user is nil.

>
> The third jpg (User-Edit) is the error I get when I try to access the
> Edit page for a user account as a non-admin.

This is the same error as the first one.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuB11ZgpERW2h8W8U9jugwOzg2Ydr0FJipXFZb1eLxEPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to