Commit 96b565f6 authored by evazion's avatar evazion

users: temp fix exception when is_banned is inconsistent.

Fix an exception when is_banned is true but the user doesn't have a ban
record.
parent fcfdd94f
......@@ -29,7 +29,7 @@
<% if CurrentUser.user.is_moderator? %>
<%= subnav_link_to "Promote", edit_admin_user_path(@user) %>
<% if @user.is_banned? %>
<% if @user.is_banned? && @user.recent_ban.present? %>
<%= subnav_link_to "Unban", ban_path(@user.recent_ban) %>
<% else %>
<%= subnav_link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment