<div class="details">
  <%= image_tag user.avatar.url(:medium), class: "avatar"%>
  <span class="name"><%= user.name %></span>
  <% if policy(user).edit? %>
  <div class="btn-group pull-right" role="group">
    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
      Actions <span class="caret"></span>
    </button>
    <ul class="dropdown-menu" role="menu">
      <li><%= link_to "Edit", edit_user_path(user) %></li>
    </ul>
  </div>
<% end %>
</div>

<div class="details">
  <%= image_tag user.avatar.url(:medium), class: "avatar"%>
  <span class="name"><%= user.name %></span>
  <% if defined?(policy) and policy(user).edit? %>
    <div class="btn-group pull-right" role="group">
      <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
        Actions <span class="caret"></span>
      </button>
      <ul class="dropdown-menu" role="menu">
        <li><%= link_to "Edit", edit_user_path(user) %></li>
      </ul>
    </div>
  <% end %>
</div>

Fix error in user details when coming from bbcode
Fix error in user details when coming from bbcode
