Module: Formol::CategoriesHelper

Defined in:
app/helpers/formol/categories_helper.rb

Instance Method Summary collapse

Instance Method Details

#formol_forum_klass(forum, user) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/formol/categories_helper.rb', line 3

def formol_forum_klass(forum, user)
  klasses = []
  
  if user.present?
    klasses << (user.has_read_forum?(forum) ? 'read' : 'unread')
  else
    klasses << 'read'
  end
  
  klasses.join(' ')
end