ruby on rails - Why do hidden fields produce hashes? -


my hidden field:

- @calc.results.each |k, v|   = hidden_field :calc_result, :value => "#{k[:total_interest]}" 

which returns :

"calc_result"=> {"value214.14"=>"", ... 

how can write hidden_field produces :

"value" => "214.14" 

you don't need pass :value, this:

= hidden_field_tag :calc_result, "#{k[:total_interest]}"

that should want.


Comments

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

asp.net mvc 3 - Unexpected "foreach" keyword after "@" character -