Sha256: 16a4480810f13917b9f6814651b0ac6803c4190a44f4fc765260ef2a6f614274

Contents?: true

Size: 634 Bytes

Versions: 22

Compression:

Stored size: 634 Bytes

Contents

<div id="<%= dom_id user %>">
  <p>
    <strong>Name:</strong>
    <%= user.name %>
  </p>

  <p>
    <strong>Email:</strong>
    <%= user.email %>
  </p>

  <div>
    <strong>Current Roles:</strong>
    <%= user.roles.where(resource_type: nil).map { |role| role.name.capitalize }.join(', ') %>
  </div>

  <div>
    <pre>
    <code>
    <% user.roles.each do |role| %>
      <%= 
        extra_info = if role.resource_type
          " (#{role.resource_type}: #{role.resource_id})"
        else
          ""
        end
        "#{role.id} - #{role.name}, #{extra_info}"
      %>
    <% end %>
    </code>
    </pre>
  </div>

</div>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rails_app_generator-0.2.30 after_templates/addons/rolify/app/views/rolify/_user.html.erb
rails_app_generator-0.2.29 after_templates/addons/rolify/app/views/rolify/_user.html.erb