store reclassified votes in order

Make sure we create Budget::ReclassifiedVotes for an investment in the
same order that the previous Budget::Ballot:Lines were previously created.
This commit is contained in:
Julian Herrero
2018-12-05 13:13:49 +01:00
parent 46b66e9376
commit 0fc1e0503e

View File

@@ -30,7 +30,7 @@ class Budget
end
def store_reclassified_votes(reason)
ballot_lines_for_investment.each do |line|
ballot_lines_for_investment.order(:id).each do |line|
attrs = { user: line.ballot.user,
investment: self,
reason: reason }