id author title date pages extension mime words sentences flesch summary cache txt blog-saeloun-com-7300 Rails 6 adds ActiveSupport::ParameterFilter | Saeloun Blog .html text/html 370 68 67 Rails 6 adds ActiveSupport::ParameterFilter Rails 6 adds ActiveSupport::ParameterFilter Rails provides filter_parameters to achive this. For example, if we have to filter secret_code of user then we need to set filter_parameters in the application.rb as below: config.filter_parameters += ["secret_code"] After sending request to server, our request parameters will look like these: Parameters: {"authenticity_token"=>"ZKeyrytDDqYbjgHm+ZZicqVrKU/KetThIkmHsFQ/91mQ/eGmIJkELhypgVvAbAg1OR+fN5TA8qk0PrOzDOtAKA==", "user"=>{"first_name"=>"First Name", "last_name"=>"Last Name", "email"=>"abc@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "secret_code"=>"[FILTERED]"}, "commit"=>"Create User"} We can see that the secret_code of user is not filtered and visible. Rails 6 has moved In Rails 6 Now we can see that secret_code is filtered. If we have filter_attributes or filter_parameters in regex or proc form, Rails 6 has added > User.filter_attributes = [/name/, :secret_code, :password] > User.filter_attributes = [/name/, :secret_code, :password] #=> [/name/, :secret_code, :password] #=> [/name/, :secret_code, :password] If you enjoyed this post, you might also like: Rails 7 adds disable_joins: true option to has_one :through association Rails 7 adds disable_joins: true option to has_one :through association ./cache/blog-saeloun-com-7300.html ./txt/blog-saeloun-com-7300.txt