Is would be nice to have a utility method like is_active? on the Subscription object. For example, to check if a subscription is active we now write:
payment_method.subscriptions.any? do |subscription|
subscription.status == Braintree::Subscription::Status::Active
end
It would improve our code if that could be replaced by something like payment_method.subscriptions.any?(&:is_active?)
Is would be nice to have a utility method like
is_active?on the Subscription object. For example, to check if a subscription is active we now write:It would improve our code if that could be replaced by something like
payment_method.subscriptions.any?(&:is_active?)