Sha256: 1b53db79d9e0657695a9816c7d81557109a47694d5984842ef6429d0e67a0842

Contents?: true

Size: 294 Bytes

Versions: 3

Compression:

Stored size: 294 Bytes

Contents

module Formol
  module CategoriesHelper
    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
formol-0.0.6 app/helpers/formol/categories_helper.rb
formol-0.0.5 app/helpers/formol/categories_helper.rb
formol-0.0.4 app/helpers/formol/categories_helper.rb