Skip to content

Commit

Permalink
Fix logout
Browse files Browse the repository at this point in the history
  • Loading branch information
felipejoglar committed May 21, 2024
1 parent f6f3905 commit 4c49a10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/views/projects/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
</ul>
<% end %>
<%= link_to 'New Project', new_project_path(Current.user), class: 'btn-primary' %>
<%= button_to 'Log out', sign_out_path(Current.user), method: :delete, class: 'btn-primary' %>
</section>
</div>
3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

resource :signup, only: %i[ create show ], controller: "users"
resource :sign_in, only: %i[ create show ], controller: "sessions"
resource :sign_out, only: :destroy, controller: "sessions"

resource :forgot_password, only: :new, controller: "passwords"
resource :password, only: %i[ create update edit ], controller: "passwords"
Expand All @@ -19,5 +18,7 @@
get "/", to: "projects#index", as: :home

resources :projects

resource :sign_out, only: :destroy, controller: "sessions"
end
end

0 comments on commit 4c49a10

Please sign in to comment.