Guest User

Untitled

a guest
Apr 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. = @leads.length == 1 ? 'is' : 'are'
  2.  
  3. ActiveSupport::Inflector.inflections do |inflection|
  4. inflection.irregular "is", "are"
  5. end
  6.  
  7. pluralize(@leads.length,'is')
  8.  
  9. 2 are
  10.  
  11. def pluralize_no_count(count, singular, plural = nil)
  12. ((count == 1 || count == '1') ? singular : (plural || singular.pluralize))
  13. end
  14.  
  15. Inflector.inflections do |inflection|
  16. inflection.irregular "is", "are"
  17. end
  18.  
  19. 'is'.pluralize # => 'are'
Add Comment
Please, Sign In to add comment