Skip to content

Add remaining method to limiter #43

@julianrubisch

Description

@julianrubisch

Working with Billing::Limiter, I thought it would be handy to have a convenience method spitting out the remaining count of allowed models.

Currently I'm solving this like so:

limiter.limits_for(:have, MyModel).map { _1["count"] }.max - team.my_model.count

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions