Closed TheNeikos closed 6 years ago
Hi @TheNeikos :) We're keen to help improve things. Would you like to look at putting together a PR to add this exception along with a test?
@brendon I've opened a PR, let me know if you want anything changed!
Roger, will look at this tomorrow :D
Ping :grin:
Sorry about the delay :)
I've had quite a headache trying to use this gem, until I saw that
top_of_list
defaults to 1 and I try starting at 0.This in turn caused a
PG::UniqueViolation
due to the incorrect swapping of objects. I think this could be prevented by raising an exception when trying to set an index that is lower thantop_of_list
? (Which should be an error anyway imo)Once I changed that setting the Exception went away, so I assumed that to be the cause.
So my suggestion would be to raise an error when an incorrect position is given