我需要从表单访问hashmapped值。这是我看到我倾倒表单元素,但我不知道我怎么能在控制器访问它们:Ruby on Rails:访问hashmap表单元素
{"Cart"=>{"exclude_discount"=>"1",
"only_one_product"=>"0",
"include_surcharge"=>"1",
"include_timesheet_date"=>"1"}}
我试图访问这些控制器使用
params[:Cart[only_one_product]]
and params[:Cart[:only_one_product]]
and params[:Cart["only_one_product"]]
都失败。任何快速的帮助真的很感激。