Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset the counter #32

Open
praneeththota opened this issue Jan 8, 2017 · 1 comment
Open

Reset the counter #32

praneeththota opened this issue Jan 8, 2017 · 1 comment

Comments

@praneeththota
Copy link

praneeththota commented Jan 8, 2017

Awesome work. But how to reset the counter and how can i access the table in rails console ?

@celsodantas
Copy link
Owner

You should be able to access the counter table with Models::CustomAutoIncrement.

And there's straight way to reset the counter for now, you can Models::CustomAutoIncrement.delete_all (which will erase all counters for all your tracked models) or find the one you need, access it directly and reset the counter.

PRs are welcome if you want to implement a reset feature =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants