Sha256: ec947434266e57fecdf36933f240109facc992a4432cfeec031524837f2d0d2e

Contents?: true

Size: 206 Bytes

Versions: 11

Compression:

Stored size: 206 Bytes

Contents

module GovernorCommentsHelper
  def comment_count(article)
    governor_authorized?(:edit, article) ?
      article.comments.size :
      article.comments.select{|comment| !comment.hidden? }.size
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
governor_comments-0.2.7 app/helpers/governor_comments_helper.rb
governor_comments-0.2.6 app/helpers/governor_comments_helper.rb
governor_comments-0.2.5 app/helpers/governor_comments_helper.rb
governor_comments-0.2.4 app/helpers/governor_comments_helper.rb
governor_comments-0.2.3 app/helpers/governor_comments_helper.rb
governor_comments-0.2.2 app/helpers/governor_comments_helper.rb
governor_comments-0.2.1 app/helpers/governor_comments_helper.rb
governor_comments-0.2.0 app/helpers/governor_comments_helper.rb
governor_comments-0.1.2 app/helpers/governor_comments_helper.rb
governor_comments-0.1.1 app/helpers/governor_comments_helper.rb
governor_comments-0.1.0 app/helpers/governor_comments_helper.rb