Hi, It's a little bit annoying to me, I can't understand the following: If I merge a value to the params hash with: params => params.merge :value => new_value the params[:value] doesn't change, but if I use string instead of a symbol like: params => params.merge "value" => new_value it works. Somebody plz tell me why... Abbath
on 2006-03-02 22:14
on 2006-03-02 22:28
I believe that :value and "value" are complety different keys. One is a string, the other is a symbol.
on 2006-03-07 23:24
Ok, You would be right if the params object had been a Hash. But - as I know - it's a HashWithIndifferentAccess object in which the symbol and the string key should be the same. > I believe that :value and "value" are complety different keys. One is > a string, the other is a symbol.
on 2006-03-24 03:50
A bit late to the party, but I filed a bug on this some while ago. It's still in the queue, AFAIK. In the mean while, you can work around it quite simply: class HashWithIndifferentAccess def merge(hash) self.dup.update(hash) end end