Forum: Ruby on Rails Nested Hashes

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
7ecff3b0a0b4bd76591cba57b10d173c?d=identicon&s=25 Nash (Guest)
on 2007-05-09 23:39
(Received via mailing list)

  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]

Rails parses name into the correct structure, namely:

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 ?

8d1e089fd6a6703f5f13dbee271aa77c?d=identicon&s=25 Yuri Leikind (Guest)
on 2007-05-10 11:58
(Received via mailing list)

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.


On 5/9/07, Nash <> wrote:
> "some_object"=>{"name"=>"",
> -Nash
> >

Best regards,
Yuri Leikind
This topic is locked and can not be replied to.