Module: Notifly::ViewHelper

Defined in:
app/helpers/notifly/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#notifliesObject



3
4
5
# File 'app/helpers/notifly/view_helper.rb', line 3

def notiflies
  notiflies_for current_user
end

#notiflies_for(receiver) ⇒ Object



7
8
9
# File 'app/helpers/notifly/view_helper.rb', line 7

def notiflies_for(receiver)
  render partial: 'notifly/layouts/notifly', locals: { receiver: receiver }
end

#notifly_icon(have_notifications = false) ⇒ Object



11
12
13
14
15
# File 'app/helpers/notifly/view_helper.rb', line 11

def notifly_icon(have_notifications=false)
  icon = have_notifications ? Notifly.icon : Notifly.icon_empty
  size = Notifly.icon_size
  fa_icon "#{icon} #{size}", id: 'notifly-icon'
end