Favor the ternary operator. 🚓

This commit is contained in:
Fatih Acet 2016-06-06 18:50:38 +03:00
parent 7cb9c7d8ea
commit 0dba294f99

View file

@ -56,7 +56,7 @@ module MilestonesHelper
def milestone_remaining_days(milestone, withContentTag = true) def milestone_remaining_days(milestone, withContentTag = true)
if milestone.expired? if milestone.expired?
if withContentTag then content_tag(:strong, 'expired') else 'expired' end withContentTag ? content_tag(:strong, 'expired') : 'expired'
elsif milestone.due_date elsif milestone.due_date
days = milestone.remaining_days days = milestone.remaining_days