rails/strong_parameters — pull request #22 by bjhess (2012-04-17 21:52:28+00:00)
Title: Allow Strings as well as Symbols as #permit parameters

Sometimes you may have existing constants or other string arrays that you wish to mix in to your `permit` call. Currently you would need to do a `map(&:to_sym)` on those string values:

```ruby
class Announcement < ActiveRecord::Base
USER_TYPES = %w{owner admin pm standard}
PLAN_TYPES = %w{business basic solo sponsored free trial}
end

# MEANWHILE...

def strong_params
expected_params = [:text, :enabled, :category] +
Announcement::USER_TYPES.map(&:to_sym) +
Announcement::PLAN_TYPES.map(&:to_sym)
params.permit(:announcement => expected_params)
end
```

Further, allowing a mix of strings and symbols is a more consistent behavior. Hope you agree!