# Attribute filtering in Rails 2.1

**URL:** <https://www.ruby-forum.com/t/attribute-filtering-in-rails-2-1/141054>\
**Category:** Rails\
**Created:** [June 21, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/attribute-filtering-in-rails-2-1/141054 "2008-06-21T13:08:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [June 21, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/attribute-filtering-in-rails-2-1/141054/1 "2008-06-21T13:08:20Z")

</div>

Hello,  
I was unable to find the commit related to removing attribute  
filtering in Rails 2.1. I’m interested in the reasoning as to why  
this was removed. Can anyone provide any insight?  
Thanks,  
Jonathan

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [June 21, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/attribute-filtering-in-rails-2-1/141054/2 "2008-06-21T21:02:20Z")

</div>

Jonathan W. wrote:

> Hello,  
> I was unable to find the commit related to removing attribute  
> filtering in Rails 2.1. I’m interested in the reasoning as to why  
> this was removed. Can anyone provide any insight?  
> Thanks,  
> Jonathan

hey there Jonathan,  
what do you mean by :attribute\_filtering?

All I can think of is the log\_param filtering.

> **[ActionController::Base](https://api.rubyonrails.org/classes/ActionController/Base.html#M000837)**
>
> Action Controllers are the core of a web request in Rails. They are made up of one or more actions that are executed on request and then either it renders a template or redirects to another action.

but that still seems to work.

“filter\_parameter\_logging :password”

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [June 26, 2008, 5:35pm UTC](https://www.ruby-forum.com/t/attribute-filtering-in-rails-2-1/141054/3 "2008-06-26T17:35:47Z")

</div>

On 21 Jun 2008, at 12:07, Jonathan W. wrote:

> Hello,  
> I was unable to find the commit related to removing attribute  
> filtering in Rails 2.1. I’m interested in the reasoning as to why  
> this was removed. Can anyone provide any insight?

Do you mean the ability to do some\_ar\_object.attributes :except =\>  
‘blah’ ?  
If so, it’s because ActiveSupport adds except/slice to hash so having  
it separately in #attributes was just duplication (and has done for a  
while)

so instead of the :except option you can do  
some\_ar\_object.attributes.except ‘blah’

Fred
