Skip to content

Commit

Permalink
Add the missing _count method
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Jul 30, 2024
1 parent da2e992 commit 3ec3702
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/ticket_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ def active_sorted_ticket_request_event_addons
ticket_request_event_addons.where('quantity > ?', 0).sort_by { |e| [e.category, e.price, e.name] }
end

# active_ticket_request_event_addons_count
def active_ticket_request_event_addons_count
active_sorted_ticket_request_event_addons.count
end

def ticket_request_event_addons?
ticket_request_event_addons.where('quantity > ?', 0).count.positive?
end
Expand Down

0 comments on commit 3ec3702

Please sign in to comment.