I have a group of records I'm pushing into a database from another format. According to my records' supposedly unique ids, some of the records I've push into my database are getting rolled back because it's saying they're duplicates. But I checked it out and although they are very similar, there are differences in the records, indicating some kind of error on either my fault while handling the data before putting it into the database or this particular state government's fault in maintaining a database with duplicate records for the same entity. I'm not sure right now.
I want to store the so called "duplicates" from this official record/list in my database but flag them with a boolean column, a column that could then be used to (based on a nil/true differentiation) filter out all of my ActiveRecord queries for that model by default.
Ideally, this would allow me to do something that would cause behavior like this:
ModelName.all.count
#=> 500
ModelName.count
#=> 623
ModelName.include_alleged_duplicates.count
#=> 623
Is there any way I could do this without breaking things too badly?