Sha256: d123c8e953bdc3030bf6f068e87cfb9d0a61b69762bef5542e6fa4ce53cb0573
Contents?: true
Size: 1.22 KB
Versions: 4
Compression:
Stored size: 1.22 KB
Contents
<% if defined?(current_user) %> <div class="nav-drawer__footer"> <div class="nav-drawer__account"> <% avatar_method = [ :avatar_url, :avatar_path, :avatar, :image_url, :image_path, :image, :gravatar, :gravatar_url, ].find { |avatar_method| current_user.respond_to?(avatar_method) } %> <% if avatar_method.present? %> <div class="nav-drawer__account__avatar"> <%= image_tag current_user.send(avatar_method), alt: '' %> </div> <% elsif current_user.respond_to?(:email) %> <div class="nav-drawer__account__avatar"> <%= image_tag gravatar_for_email(current_user.email), alt: '' %> </div> <% end %> <div class="nav-drawer__account__details"> <% name_method = [ :name, :first_name, :nickname, :username, :user, :email, ].find { |name_method| current_user.respond_to?(name_method) } %> <% if name_method.present? %> <h2>Welcome,</h2> <h3><%= current_user.send(name_method) %></h3> <% else %> <h2>Welcome</h2> <% end %> </div> </div> </div> <% end %>
Version data entries
4 entries across 4 versions & 1 rubygems