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 think you just pass the array of fields , not a hash of them. So: unique_by: [:book_id, :book_detail_id]
which looks for a unique set of book_id and book_detail_id. (no idea what happens in one of those is null)
hope that helps
This is my migration file.
This is my code.
But I am getting this error.
No unique index found for {:columns=>[:book_id, :book_detail_id]}
The text was updated successfully, but these errors were encountered: