Permalink
Browse files

remove attr_protected reference from AS Core Extensions guide [ci skip]

  • Loading branch information...
1 parent 1e83730 commit c04dc674cceef76408eb7f22e30c7ffc36c9262d Francesco Rodriguez committed Dec 11, 2012
Showing with 0 additions and 7 deletions.
  1. +0 −7 guides/source/active_support_core_extensions.md
@@ -2678,13 +2678,6 @@ If the receiver responds to `convert_key`, the method is called on each of the a
{a: 1}.with_indifferent_access.except("a") # => {}
```
-The method `except` may come in handy for example when you want to protect some parameter that can't be globally protected with `attr_protected`:
-
-```ruby
-params[:account] = params[:account].except(:plan_id) unless admin?
-@account.update_attributes(params[:account])
-```
-
There's also the bang variant `except!` that removes keys in the very receiver.
NOTE: Defined in `active_support/core_ext/hash/except.rb`.

0 comments on commit c04dc67

Please sign in to comment.