ranked-model
ranked-model copied to clipboard
Not setting the rank when creating a new object
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?
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?
Closing due to inactivity.