From 512b64a104fd7095ff7b1d09652cc61cfb739941 Mon Sep 17 00:00:00 2001 From: Matt Dunn-Rankin Date: Mon, 9 Jan 2017 11:35:55 -0800 Subject: [PATCH] update campaign final stretch copy --- app/helpers/application_helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 355d5fc5..f4c28488 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -39,8 +39,12 @@ module ApplicationHelper pitch = "We've met this year's fundraising goal! Thanks, everybody!" prompt = "Learn more" elsif campaign.remaining < 200_00 - estimate = (campaign.remaining.to_f / 5_00).ceil * 5_00 - pitch = "We're less than #{cents_to_currency(estimate, precision: 0)} away from paying this year's hosting costs!" + estimate = (campaign.remaining.to_f / 10_00).ceil * 10_00 + if estimate == campaign.remaining + pitch = "We're only #{cents_to_currency(estimate, precision: 0)} away from paying #{campaign.purpose}!" + else + pitch = "We're less than #{cents_to_currency(estimate, precision: 0)} away from paying #{campaign.purpose}!" + end prompt = "Donate now" else pitch = "Help Dress to Impress stay online!"