# Nested Hashes

**URL:** <https://www.ruby-forum.com/t/nested-hashes/103754>\
**Category:** Rails\
**Created:** [May 9, 2007, 11:39pm UTC](https://www.ruby-forum.com/t/nested-hashes/103754 "2007-05-09T23:39:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/91b2a8/32.png) [@Nash](https://www.ruby-forum.com/u/Nash)\
**Post date:** [May 9, 2007, 11:39pm UTC](https://www.ruby-forum.com/t/nested-hashes/103754/1 "2007-05-09T23:39:56Z")

</div>

Hi,

I’m about to implement a feature that requires a complex set of  
options to be sent over. This requires me to do things like:

text\_field “some\_object”, “”, :name =\> “inventory\_view[settings]  
[where\_clause][inventory\_days\_symbol]”

Rails parses name into the correct structure, namely:  
“some\_object”=\>{“name”=\>"",  
“settings”=\>{“where\_clause”=\>{“inventory\_days”=\>“34”}}}

What I"m worried about is whether this is an acceptable way of doing  
things. I don’t want to assume that if it works, then it’s OK. I’m  
trying to avoid future breaks with upgrades.

What do railers do to handle posts that require complex structures  
like this instead of the usual :some\_key =\> some\_hash ?

-Nash

---

<div class="post-metadata">

**Author:** ![Nash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/91b2a8/32.png) [@Nash](https://www.ruby-forum.com/u/Nash)\
**Post date:** [May 10, 2007, 11:58am UTC](https://www.ruby-forum.com/t/nested-hashes/103754/2 "2007-05-10T11:58:51Z")

</div>

Hey,

Are you sure you need such a deep structure and you cannot flatten it?  
If you are, I see no problems, it should just work.

Cheers,  
Yuri

On 5/9/07, Nash [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> “some\_object”=\>{“name”=\>“”,  
> -Nash
> 
> >

–  
Best regards,  
Yuri L.
