Sha256: 70be7381d27370f9f78d4285cf0131b464c3bdfb640e7a1ba7329ec724ed5aec

Contents?: true

Size: 776 Bytes

Versions: 6

Compression:

Stored size: 776 Bytes

Contents

<%#
    headmin/dropdown/locale
    accepts block: yes
    parameters:
      scope: (symbol) devise scope, i.e. ':users' => current_user
%>

<% scope = local_assigns.has_key?(:scope) ? scope : :users %>
<% singular = scope.to_s.singularize.to_sym %>
<% user = send("current_#{singular}") %>

<%= render 'headmin/dropdown' do %>
  <%= render 'headmin/dropdown/button' do %>
    <%= user.to_s %>
  <% end %>
  <%= render 'headmin/dropdown/list' do %>
    <%= render 'headmin/dropdown/item', name: t('.edit_profile'), url: polymorphic_path([:edit, singular, :registration]) %>
    <%= render 'headmin/dropdown/divider' %>
    <%= render 'headmin/dropdown/item', name: t('.log_out'), url: polymorphic_path([:destroy, singular, :session]), method: :delete %>
  <% end %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
headmin-0.2.5 app/views/headmin/dropdown/_devise.html.erb
headmin-0.2.4 app/views/headmin/dropdown/_devise.html.erb
headmin-0.2.3 app/views/headmin/dropdown/_devise.html.erb
headmin-0.2.2 app/views/headmin/dropdown/_devise.html.erb
headmin-0.2.1 app/views/headmin/dropdown/_devise.html.erb
headmin-0.2.0 app/views/headmin/dropdown/_devise.html.erb