Sha256: 955a84f1c3611527a3b26e54fa4e1d406e094c2654badc68ddd192d2cadd9125

Contents?: true

Size: 186 Bytes

Versions: 20

Compression:

Stored size: 186 Bytes

Contents

module Mumuki::Laboratory::Controllers::Messages
  def has_messages?
    messages_count > 0
  end

  def messages_count
    current_user.try(:unread_messages).try(:count) || 0
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mumuki-laboratory-5.5.0 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.4.0 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.3.0 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.2.1 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.2.0 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.1.1 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.1.0 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.12 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.11 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.10 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.9 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.8 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.7 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.6 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.5 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.4 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.3 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.2 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.1 lib/mumuki/laboratory/controllers/messages.rb
mumuki-laboratory-5.0.0 lib/mumuki/laboratory/controllers/messages.rb