Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement case-insensitive uniqueness validation #236

Merged
merged 5 commits into from
May 29, 2018

Conversation

shioyama
Copy link
Owner

Replaces #221

shioyama added 4 commits May 29, 2018 10:38
Using send(Mobility.query_method) everywhere is clumsy for gem code, so
instead of defining the method dynamically, we can define it as
__mobility_query_scope__ and alias Mobility.query_method to this method.
@shioyama shioyama force-pushed the case_insensitive_uniqueness branch from 60d562b to f87db93 Compare May 29, 2018 02:01
@shioyama
Copy link
Owner Author

Pleasantly surprised to find that this was very easy to implement with Arel support.

Otherwise this will fail for versions of Ruby earlier than 2.5
@shioyama shioyama merged commit e0b12e1 into master May 29, 2018
@shioyama shioyama deleted the case_insensitive_uniqueness branch May 29, 2018 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant