Skip to content

Commit

Permalink
event host render fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Aug 14, 2023
1 parent 2ba85b9 commit f8ad4a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def is_admin?
end

def is_creator?
role == "artist" || role == "admin"
username.present? && role == "artist" || role == "admin"
end

def user_sales_for(kind = "Track")
Expand Down
12 changes: 6 additions & 6 deletions app/views/event_hosts/_event_host.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<%= event_host.name %>
</h3>
<% if event_host.user.is_creator? %>
<ul>
<li>
<%= link_to event_host.user.username , user_path(event_host.user.username) %>
</li>
<li><%= event_host.user.username %></li>
</ul>
<ul>
<li>
<%= link_to event_host.user.username , user_path(event_host.user.username) %>
</li>
<li><%= event_host.user.username %></li>
</ul>
<% end %>

<div class="flex space-x-2">
Expand Down

0 comments on commit f8ad4a0

Please sign in to comment.