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

Added ability to opt out uniqueness validation #91

Closed
wants to merge 2 commits into from

Conversation

VigneshRE
Copy link

This is helpful when you want to make the uniqueness validation dynamically decided

@dnagir
Copy link
Contributor

dnagir commented Dec 14, 2011

I don't understand why you would put :uniquness => false.

If you want to dynamically decide whether the validation should kick in or not then you can just write
validates :name, :uniqueness => true, :if => :should_be_unique?.

This is how ActiveModel behaves by default.

@dnagir
Copy link
Contributor

dnagir commented Dec 14, 2011

I'm strongly against this PR as it is already supported and goes against all the conventions.

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.

None yet

3 participants