Filtering parameters inside arrays when logging

Hi,

This is my first post here. I've stumbled upon this while creating an application which makes use of nested forms. Basically, I have an Account model which has many Users. When I create the account it creates one User. The action receives parameters like:

:account => { :name => 'foo', :users_attributes => [{ :login => 'foo', :password => 'secret', :password_confirmation => 'secret' }] }

Since my controller has the following line:

filter_parameter_logging :password, :password_confirmation

I was expecting to see both password and password_confirmation filtered, but they weren't. Looking inside filter_parameter_logging I understand that it didn't treated arrays. I've made a patch, but it seems rails.lighthouseapp.com is down, so I'll just post it here. The patch contains changes to both code and tests. I've made it by branching origin/2-3-stable.

Thanks

Here it is:

From 2d00dfe54911049a7b84814b5d630023694c1d3d Mon Sep 17 00:00:00 2001

Just added a ticket in lighthouse:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2851-filtering-parameters-inside-arrays-when-logging

I couldn't do it earlier because it was down on Friday.