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

Already on GitHub? Sign in to your account

Fix in #hash_for_field to handle nested array indexes #2

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

Came up with this limitation when trying to do something like:
self.inc "tasks.0.hours", 1
and saw #hash_for_field didn't typecast indexes for nested arrays

Run the tests, didn't see anything broken O=)

Thanks and kind regards,

Lorenzo

Lorenzo Planas #hash_for_field typecasts numeric fields to Integer, so fields like "…
…comments.0.author" are appropriately handled
b0f5f15
Owner

benmyles commented Sep 18, 2010

Thanks for the patch. If you'd like to add some tests to make sure it works properly I'd be happy to include it.

I'll sure do. Didn't do it right away because I'm not familiar with shoulda, but it can't be that difficult =)

Thanks!

Collaborator

jsmestad commented Apr 6, 2011

@lplanas any update on the tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment