You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a client which has many addresses and each address I use acts_as_list scoped by the client. My client_id in the addresses table has an index attached to it which broke my tests.
acts_as_list scope: :client
Now when I add the first address it gets position 1, and the second gets position 1. If I remove the index on client_id, then it works as expected. The first address gets position 1, and the second address I add to the client gets position 2. The only thing I changed was removing the index on client_id.
The text was updated successfully, but these errors were encountered:
That's a strange one. I can't see how the index would be interacting with it. It's best to explicitly scope on the column name, so :client_id. Can you try that and let me know?
Thanks for reporting back. Probably the next thing to look at doing is creating a failing test in our test suite. Do you think you'll be able to do that for me so we can investigate further? I assume you're just creating a standard index using rails migrations?
I have a client which has many addresses and each address I use acts_as_list scoped by the client. My client_id in the addresses table has an index attached to it which broke my tests.
acts_as_list scope: :client
Now when I add the first address it gets position 1, and the second gets position 1. If I remove the index on client_id, then it works as expected. The first address gets position 1, and the second address I add to the client gets position 2. The only thing I changed was removing the index on client_id.
The text was updated successfully, but these errors were encountered: