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

Introduce invalid? method as an opposite to valid? #64

Merged
merged 1 commit into from
May 21, 2015

Conversation

deepj
Copy link
Contributor

@deepj deepj commented May 18, 2015

Sometimes I need to check if a model is invalid rather than valid. In this case I prefer this form to using if !model.valid? or unless model.valid?. I hope you consider this as an useful method.

Any comments are welcome!

BTW: I am not sure where I would have put a test for this case. So I hope I put it into a right place. Openly, I am a bit confused by the structure of tests.

@runlevel5
Copy link
Member

I am good with this proposal 👍

@AlfonsoUceda
Copy link
Contributor

👍

@jodosha jodosha self-assigned this May 21, 2015
@jodosha jodosha added this to the v0.3.2 milestone May 21, 2015
@jodosha jodosha merged commit 15cb6a3 into hanami:master May 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants