Module: Locomotive::Shared::AccountsHelper

Defined in:
app/helpers/locomotive/shared/accounts_helper.rb

Instance Method Summary collapse

Instance Method Details

#account_avatar_and_name(account, size = '70x70#') ⇒ Object



13
14
15
16
# File 'app/helpers/locomotive/shared/accounts_helper.rb', line 13

def (, size = '70x70#')
  avatar  = image_tag((, size), class: 'img-circle', style: 'width: 20px')
  profile = avatar + (.try(:name) || t(:unknown_account, scope: 'locomotive.dashboard.activity'))
end

#account_avatar_url(account, size = '70x70#') ⇒ Object



5
6
7
8
9
10
11
# File 'app/helpers/locomotive/shared/accounts_helper.rb', line 5

def (, size = '70x70#')
  if  && .avatar?
    Locomotive::Dragonfly.resize_url .avatar.url, size
  else
    'locomotive/user.png'
  end
end