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

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -