rails/strong_parameters — pull request #40 by kibs (2012-10-04 10:26:15+00:00)
Title: Support for nested fields_for with alphanumeric keys

Hi,

I was trying to get the [nested_form](https://github.com/ryanb/nested_form) gem working with strong_parameters. And I am having some trouble getting the two of them working nicely together.

Nested_form is using javascript for adding more or less nested fields for, when working with a model through a form. It is auto creating a unique index key for each set of fields, resulting in nested_attributes parameters with alphanumeric keys, instead of the normal integer based 0,1,2 etc.

I am not quite sure how to fix this, but i have added a failing test describing the problem. I could also try to change nested_form, but I think the solution would be more flexible if strong_parameters supported this.

One solution could be allowing the [regexp](https://github.com/rails/strong_parameters/blob/master/lib/action_controller/parameters.rb#L97), currently used for detecting integer based keys, to be changed in a configuration setting.

- Sune