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

Not setting the rank when creating a new object #123

Open
dlynam opened this issue Dec 10, 2017 · 1 comment
Open

Not setting the rank when creating a new object #123

dlynam opened this issue Dec 10, 2017 · 1 comment

Comments

@dlynam
Copy link

dlynam commented Dec 10, 2017

Is there any way to not set the rank when creating a new object? For example, if I have

class Car < ActiveRecord::Base
  ranks :rank
end

Can I save a new Car object and keep the rank field nil?

@brendon
Copy link
Owner

brendon commented Mar 18, 2019

Hi @dlynam, I don't believe so. The point of the rank is that everything in the scope has a rank. You could try scoping in such a way that the non-ranked car is outside the scope, then it wouldn't receive a rank?

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