rails / strong_parameters

Taint and required checking for Action Pack and enforcement in Active Model
MIT License
1.27k stars 164 forks source link

Exceptions thrown when permitting array columns #153

Open sgrif opened 11 years ago

sgrif commented 11 years ago

Given the following:

create_table :users do |t|
  t.string :ethnicity, array: true
end

I can not pass parameters using params.require(:user).permit(:ethnicity). I instead need to do params.require(:user).permit(ethnicity: [])

dhh commented 11 years ago

That's intentional and by design.

On Jun 12, 2013, at 21:07, sgrif notifications@github.com wrote:

Given the following:

create_table :users do |t| t.string :ethnicity, array: true end I can not pass parameters using params.require(:user).permit(:ethnicity). I instead need to do params.require(:user).permit(ethnicity: [])

— Reply to this email directly or view it on GitHub.

thomasfedb commented 11 years ago

Can this be closed please?