Skip to content

Instantly share code, notes, and snippets.

@thebrianemory
Last active January 17, 2018 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thebrianemory/574e8268770afb4141bfcf4d10835a70 to your computer and use it in GitHub Desktop.
Save thebrianemory/574e8268770afb4141bfcf4d10835a70 to your computer and use it in GitHub Desktop.
... <!-- Code removed for readability -->
<div class="top-bar-right">
<ul class="menu">
<%= if @conn.assigns[:user] do %>
<li class="menu-text">
Welcome, <%= @conn.assigns.user.first_name %>!
</li>
<li>
<%= link "Videos", to: video_path(@conn, :index) %> <!-- Update this line -->
</li>
<li>
<%= link "Add video", to: video_path(@conn, :new) %> <!-- Update this line -->
</li>
<li>
<%= link "Sign out", to: auth_path(@conn, :signout), class: "button alert" %>
</li>
<% else %>
<li>
<%= link "Videos", to: video_path(@conn, :index) %> <!-- Update this line -->
</li>
<li>
<%= link "Sign in with Google", to: auth_path(@conn, :request, "google", scope: "email profile"), class: "button" %>
</li>
<% end %>
</ul>
</div>
... <!-- Code removed for readability -->
@richjdsmith
Copy link

<%= link "Sign out", to: auth_path(@conn, :signout), class: "button alert" %>

Should be:

<%= link "Sign out", to: auth_path(@conn, :delete), class: "button alert" %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment