How to access rails inner hash with in a hash
Most of the time u are posting u’r post with hash with include another hash. As an example I copy a post parameters I have posted.
Parameters: {“commit”=>”Create”, “date”=>{“minute”=>”30″, “hour”=>”19″}}
I copped this from mongrel server console. So how access the :minute value?
Ruby give us a way for accessing inner hash with another hash. So we can access this using following method
params [:date][:minute]
Rails automatically assign post parameter to the “params” hash. Here params is the first hash and we access the date hash with in it. Then we access it’s minute key and get the value.