Sha256: d8857c13c984c2fc415373ede983897ed1a76c788b7d0985fab992d09dc7fc91
Contents?: true
Size: 303 Bytes
Versions: 3
Compression:
Stored size: 303 Bytes
Contents
module LoveMonster module LovesHelper def liker_text(love) names = love.likes.map {|like| like.liker.try(:name) }.compact verb = "likes" if names.present? verb = verb.singularize if names.size > 1 "#{names.to_sentence} #{verb} this." end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
love_monster-0.0.3 | app/helpers/love_monster/loves_helper.rb |
love_monster-0.0.2 | app/helpers/love_monster/loves_helper.rb |
love_monster-0.0.1 | app/helpers/love_monster/loves_helper.rb |