From 0dba294f99e5ec672b4a8a97b5d51ac79a3efc8b Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Mon, 6 Jun 2016 18:50:38 +0300 Subject: [PATCH] Favor the ternary operator. :police_car: --- app/helpers/milestones_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index 2abb0e9b179..f6a8ae3fd63 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -56,7 +56,7 @@ module MilestonesHelper def milestone_remaining_days(milestone, withContentTag = true) if milestone.expired? - if withContentTag then content_tag(:strong, 'expired') else 'expired' end + withContentTag ? content_tag(:strong, 'expired') : 'expired' elsif milestone.due_date days = milestone.remaining_days