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

Hash parameters validate themselves before their children now to avoid NoMethodError being raised #183

Merged
merged 2 commits into from
Jan 16, 2014

Conversation

nathanhoel
Copy link
Contributor

fixes #182

@iNecas
Copy link
Member

iNecas commented Jan 10, 2014

Thanks for the fix! If you want to give it a try, having a test covering this behaviour in https://github.com/nathanhoel/apipie-rails/blob/c49ce1f85d8a35082fbc8c93955d1d922225c2ae/spec/lib/validator_spec.rb#L54 would be great.

@nathanhoel
Copy link
Contributor Author

Cool. Yeah actually I started one but got distracted. Hopefully soon!
On 10 Jan 2014 03:27, "Ivan Necas" notifications@github.com wrote:

Thanks for the fix! If you want to give it a try, having a test covering
this behaviour in
https://github.com/nathanhoel/apipie-rails/blob/c49ce1f85d8a35082fbc8c93955d1d922225c2ae/spec/lib/validator_spec.rb#L54would be great.


Reply to this email directly or view it on GitHubhttps://github.com//pull/183#issuecomment-32010478
.

@nathanhoel
Copy link
Contributor Author

I will likely get the test in next week. This fix was a tangent to what I
really needed to do but I will get back to it ASAP.

On Fri, Jan 10, 2014 at 9:51 AM, Nathan Hoel nathanhoel@gmail.com wrote:

Cool. Yeah actually I started one but got distracted. Hopefully soon!
On 10 Jan 2014 03:27, "Ivan Necas" notifications@github.com wrote:

Thanks for the fix! If you want to give it a try, having a test covering
this behaviour in
https://github.com/nathanhoel/apipie-rails/blob/c49ce1f85d8a35082fbc8c93955d1d922225c2ae/spec/lib/validator_spec.rb#L54would be great.


Reply to this email directly or view it on GitHubhttps://github.com//pull/183#issuecomment-32010478
.

Also made the check more ruby-ish
@nathanhoel
Copy link
Contributor Author

Okay, test added and now convinces me 100% this was a bug.

@iNecas
Copy link
Member

iNecas commented Jan 16, 2014

You rock!

iNecas added a commit that referenced this pull request Jan 16, 2014
Hash parameters validate themselves before their children now to avoid NoMethodError being raised
@iNecas iNecas merged commit 2035c21 into Apipie:master Jan 16, 2014
@iNecas
Copy link
Member

iNecas commented Mar 3, 2014

Released in 0.1.0. Thank you for your help!

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.

Hash validation raises NoMethodError exception when parameter is not a hash
2 participants