Closed sampatbadhe closed 6 months ago
Interesting. What do you think @danielmorrison ? This was merged by you from #241
I'd still like to hear from @danielmorrison / @shekibobo if possible please 😄
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@botandrose what do you think about this PR?
@parndt Hmm, my first thought is curiosity about the motivation behind the PR. @sampatbadhe did you find yourself in a situation where lft
and rgt
were outside of the max sequence? How did this happen?
Thank you for checking @botandrose & @parndt
Upon reviewing the our database today, I didn't find any records where "lft" and "rgt" were outside the maximum sequence. However, there were some records earlier that had this issue, which I manually corrected a while ago. Closing this PR as its no longer an issue.
Validate
lft
andrgt
should be less then max sequence which is (number of records * 2)i.e.
In above case,
Category.valid?
returnstrue
, but expecting to returnfalse
so that it can rebuild again to correct the sequence.Please feel free to close this PR if my changes looks invalid, as I noticed the scenario which I mentioned was considered as valid case and covered in spec that way.