Sha256: 66fa93971711f379b44b0808680d58dd7330d0aae7d5ec3e45660f8d1aadadeb

Contents?: true

Size: 454 Bytes

Versions: 1

Compression:

Stored size: 454 Bytes

Contents

module MyForum
  module PrivateMessagesHelper

    def new_pm_button
      return unless current_user
      content_tag :div, class: 'new_pm_button' do
        link_to t('my_forum.create_new_pm'), new_private_message_path, class: 'btn btn-primary'
      end
    end

    def new_private_messages_count_bage
      return unless current_user
      return if (count = new_pm_count).eql?(0)
      content_tag(:span, count, class: 'badge')
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
my_forum-0.0.1.beta1 app/helpers/my_forum/private_messages_helper.rb