Skip to content

Conversation

@jkowens
Copy link
Contributor

@jkowens jkowens commented Oct 9, 2018

An option to enable uniqueness validators was added to activerecord-import v0.27.0. There are several pitfalls with attempting uniqueness validation, so it is still not recommended. See zdennis/activerecord-import#228 for more info.

Closes #151, #152, #160.


def assign_options(options)
@options = { batch_size: 1000, validate: true }.merge(options.slice(*OPTIONS))
@options = { batch_size: 1000, validate: true, validate_uniqueness: true }.merge(options.slice(*OPTIONS))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [111/80]

@coveralls
Copy link

coveralls commented Oct 9, 2018

Coverage Status

Coverage increased (+2.2%) to 100.0% when pulling 66dba6e on jkowens:master into 838e257 on activeadmin-plugins:master.

@jkowens
Copy link
Contributor Author

jkowens commented Jan 11, 2019

Hi @Fivell, any chance you could take a look at this PR for me?

@Fivell
Copy link
Member

Fivell commented Jan 11, 2019

@jkowens looks good, looks like we can update now without regression 👍

@Fivell Fivell requested review from senid231 and workgena January 11, 2019 16:19
@Fivell
Copy link
Member

Fivell commented Jan 15, 2019

@workgena take a look pls, if ok lets release new version

Copy link
Contributor

@workgena workgena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quick manual check with test project. The solution seems to work fine.

@jkowens, thx for contribution 🎉 🎄

PS: New gem version will be released today.

@workgena workgena merged commit 99c17fd into activeadmin-plugins:master Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants