Remove unused methods

One method was calling `reason_for_not_being_ballotable_by` passing just
one parameter instead of two.

The other method was calling the method `amount_spent`, which does not
exist in the Budget class.

So both methods would make the application crash if they were called.
Luckily, they aren't, so the application doesn't crash.
This commit is contained in:
Javi Martín
2020-07-12 22:53:02 +02:00
parent 7c425c00aa
commit 7ce2d8b7eb
2 changed files with 0 additions and 8 deletions

View File

@@ -163,10 +163,6 @@ class Budget < ApplicationRecord
formatted_amount(heading_price(heading))
end
def formatted_heading_amount_spent(heading)
formatted_amount(amount_spent(heading))
end
def investments_orders
case phase
when "accepting", "reviewing"

View File

@@ -301,10 +301,6 @@ class Budget
user.headings_voted_within_group(group).where(id: heading.id).exists?
end
def ballotable_by?(user)
reason_for_not_being_ballotable_by(user).blank?
end
def enough_money?(ballot)
available_money = ballot.amount_available(heading)
price.to_i <= available_money