Skip to content

Commit

Permalink
fix articles show
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Oct 13, 2023
1 parent a5dc056 commit 4246820
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/articles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def show
# url: Routes.articles_show_url(socket, :show, post.id),
title: "#{@post.title} on Rauversion",
description: "Read #{@post.title} by #{@post.user.username} on Rauversion.",
image: @post&.cover_url(:small)&.url,
image: @post&.cover_url(:small),
)
end

Expand Down
6 changes: 4 additions & 2 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
<% if current_user && @user.id != current_user&.id %>
<%= render "user_follows/follow_button", user: @user %>
<% else %>
<a href="/michelson/insights" class="text-base font-medium text-gray-500 hover:text-gray-900 dark:text-gray-300 dark:hover:text-gray-100"><%= t("profile.your_stats")%> </a>
<a href="/users/settings" class="ml-8 inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-base font-medium text-white bg-gray-600 hover:bg-gray-700"> <%= t("profile.edit") %> </a>
<%= link_to t("profile.your_stats"), user_insights_path(@user.username), class: "text-base font-medium text-gray-500 hover:text-gray-900 dark:text-gray-300 dark:hover:text-gray-100" %>
<% if current_user && current_user.id == @user.id %>
<%= link_to t("profile.edit"), user_settings_path(@user.username), class: "ml-8 inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-base font-medium text-white bg-gray-600 hover:bg-gray-700" %>
<% end %>
<% end %>
</div>
</div>
Expand Down

0 comments on commit 4246820

Please sign in to comment.