Sha256: 5a6405ae860f5e1f6bf9b64ef68770bb107add56b763bea650171a9672951b83
Contents?: true
Size: 596 Bytes
Versions: 37
Compression:
Stored size: 596 Bytes
Contents
module Locomotive module Shared module AccountsHelper def account_avatar_url(account, size = '70x70#') if account && account.avatar? Locomotive::Dragonfly.resize_url account.avatar.url, size else 'locomotive/user.png' end end def account_avatar_and_name(account, size = '70x70#') avatar = image_tag(account_avatar_url(account, size), class: 'img-circle', style: 'width: 20px') profile = avatar + (account.try(:name) || t(:unknown_account, scope: 'locomotive.dashboard.activity')) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems