Module: BlogPostsHelper

Defined in:
app/helpers/blog_posts_helper.rb

Instance Method Summary collapse

Instance Method Details

#pluralize_if(count, string) ⇒ Object



3
4
5
6
7
# File 'app/helpers/blog_posts_helper.rb', line 3

def pluralize_if(count, string)
  result = "#{count.to_s} #{string.pluralize}"
  result = "#{count.to_s} #{string}" if count == 1
  result
end