Skip to content
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

Merged
merged 15 commits into from
May 22, 2019
Merged

User nav #96

merged 15 commits into from
May 22, 2019

Conversation

WHomer
Copy link

@WHomer WHomer commented May 22, 2019

What does this PR do?
satisfies #80.
Notice route for get '/logout', to: 'sessions#logout' was needed for testing.

@WHomer WHomer mentioned this pull request May 22, 2019
7 tasks
Copy link

@zachlp2016 zachlp2016 left a 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
Copy link
Owner

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

@VinceCarollo VinceCarollo merged commit 30f0984 into master May 22, 2019
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
Copy link
Owner

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' )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, much cleaner!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants