Make a CalculateSuggestedAmount.get_bracket_by_amount slightly more efficient

This commit is contained in:
Eric Schultz 2021-05-24 12:05:48 -05:00 committed by Eric Schultz
parent fbc3d8e51d
commit 9a9c29a0d8

View file

@ -79,6 +79,6 @@ module CalculateSuggestedAmounts
end
def self.get_bracket_by_amount(amount)
BRACKETS.select { |i| i[:range].cover?(amount) }.first
BRACKETS.detect { |i| i[:range].cover?(amount) }
end
end