Sha256: ccf651b8ded7a146141dac4359ea3e8c964846854c46f7c5ccd8b2f318ef1205

Contents?: true

Size: 534 Bytes

Versions: 2

Compression:

Stored size: 534 Bytes

Contents

module MyForum
  module UsersHelper
    # Display title name dependent user posts count
    def user_title(user)
      #TODO
      t('.beginner')
    end

    # Display user avatar
    def user_avatar(user)
      image_tag('blank_avatar.png', class: 'user-avatar')
    end

    def user_posts_count(user)
      user.posts_count
    end

    def online_user_marker(user_login)
      return unless User.online.pluck(:login).include?(user_login)
      content_tag :div, ' '.html_safe, class: 'label label-success'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
my_forum-0.0.1.beta2 app/helpers/my_forum/users_helper.rb
my_forum-0.0.1.beta1 app/helpers/my_forum/users_helper.rb