Ruby on rails 如何允许自定义参数使用强参数?

Ruby on rails 如何允许自定义参数使用强参数?,ruby-on-rails,ruby,ruby-on-rails-3,strong-parameters,Ruby On Rails,Ruby,Ruby On Rails 3,Strong Parameters,我得到如下参数 {"utf8"=>"✓", "authenticity_token"=>"auth_token=", "js_data_entry"=>[{"data_entry"=>[{"name"=>"test_book22", "node_id"=>"65", "field_type"=>"Text", "options_attributes"=>[{"option_value"=>""}], "location"=>"Body

我得到如下参数

 {"utf8"=>"✓", "authenticity_token"=>"auth_token=", "js_data_entry"=>[{"data_entry"=>[{"name"=>"test_book22", "node_id"=>"65", "field_type"=>"Text", "options_attributes"=>[{"option_value"=>""}], "location"=>"Body", "rank"=>"", "must_fill"=>"0", "multi"=>"0", "role"=>["4"], "update_db"=>"vocation.name", "select_db"=>""}], "js_editor"=>[{"field_id"=>"", "field_class"=>"", "js_code"=>""}]}], "node_id"=>"65", "commit"=>"Submit", "action"=>"create", "controller"=>"data_entries"}
我试着允许params如下

 def entry_params
   params.require(:js_data_entry).permit([:node_id, :field_type, :name, :location, :rank, :multi, :must_fill, :update_db, :select_db, :role, :options_attributes])
 end
但这是投掷

undefined method `permit' for #<Array:0xc603e78>
未定义的方法“允许”#

请帮助我解决此问题。

我已按如下方式解决此问题

 params.require(:js_data_entry)[0].permit(:data_entry=>[:node_id, :field_type, :name, :location, :rank, :multi, :must_fill, :update_db, :select_db, :role=>[], :options_attributes=>[:option_value]], :js_editor=>[:field_id,:field_class,:js_code])

具有强参数gem的Rails3