Sha256: 9c9c5c5b0a486bd0236caba9d34edb35f67396fa8dcfefc055e30daedc789fba
Contents?: true
Size: 569 Bytes
Versions: 11
Compression:
Stored size: 569 Bytes
Contents
format :html do def link_to_mycard link_to_card Auth.current.name, nil, id: "my-card-link", class: "nav-link #{classy('my-card')}" end def account_dropdown &render_role_item split_button link_to_mycard, nil do [ link_to_card([Auth.current, :account_settings], "Account"), (["Roles", role_items(&render_role_item)] if special_roles?) ] end end def special_roles? Auth.current_roles.size > 1 end def role_items Auth.current_roles.map do |role_name| yield role_name end end end
Version data entries
11 entries across 11 versions & 2 rubygems