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:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user