Password filtering does not work

In my Rails 4 application, when I have a form including a password, i.e.

   <%= password_field_tag 'admpwd', nil, size:32, maxlength: 32, class:
'admentry' %>

I don't like the fact that the password is shown plain text in the log
file, and would like to disable this. I found several suggestions to
place the call

   filter_parameter_logging "password"

into application.rb, but when I do it, I get the error message

   undefined method `filter_parameter_logging' for
Tamsin::Application:Class

How can I do this correctly?

Hint: look at your initializers.

Hassan Schroeder wrote in post #1156593:

In my Rails 4 application, when I have a form including a password, i.e.

I don't like the fact that the password is shown plain text in the log
file, and would like to disable this.

How can I do this correctly?

Hint: look at your initializers.

Thanks, that was it!

Just for the record:

The default content of

   config/initializers/filter_parameter_logging.rb

(which was probably generated automatically with my rails application)
is

   Rails.application.config.filter_parameters += [:password]

Since my password field is named differently, I had to add it to this
list:

   Rails.application.config.filter_parameters += [:password,:admpwd]