mirror of
https://github.com/we-promise/sure.git
synced 2026-05-07 04:44:08 +00:00
Update app/models/insight/generators/net_worth_milestone_generator.rb
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Juan José Mata <jjmata@jjmata.com>
This commit is contained in:
@@ -24,7 +24,7 @@ class Insight::Generators::NetWorthMilestoneGenerator < Insight::Generator
|
||||
series_high = prior_values.max.to_f
|
||||
thirty_day_high = current_nw >= series_high && current_nw > prior_nw
|
||||
|
||||
crossed = ROUND_MILESTONES.find { |m| current_nw >= m && prior_nw < m }
|
||||
crossed = ROUND_MILESTONES.reverse_each.find { |m| current_nw >= m && prior_nw < m }
|
||||
|
||||
return [] unless crossed || thirty_day_high
|
||||
|
||||
|
||||
Reference in New Issue
Block a user