-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User nav #96
User nav #96
Conversation
…create, appears the user was never getting created.
…logic for reseting cookies, not part of story
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent job looks gouda.
@@ -16,6 +14,10 @@ def create | |||
end | |||
end | |||
|
|||
def logout | |||
reset_session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the best/idiomatic way of doing this?
# removes :person from session
session[:person] = nil
or you can remove the entire session with reset_session.
Answered my own question! From the Rails Docs
context 'as a visitor' do | ||
describe 'navbar includes the following' do | ||
it 'a link to return to the welcome / home page of the application ("/")' do | ||
visit root_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the Navbar on the Welcome page?
|
||
|
||
|
||
user_2 = User.create!(name: "User_1", role: 0, active: true, password_digest: "8320280282", address: "333", city: "Denver", zip: "80000", email: "user_1@gmail.com", state: 'IL' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, much cleaner!
What does this PR do?
satisfies #80.
Notice route for
get '/logout', to: 'sessions#logout'
was needed for testing.