Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add #update_columns entry to AR Changelog.

  • Loading branch information...
commit bca66a3547ac166eccac3e8cfead3d93b3d0921b 1 parent f63dd4a
@smartinez87 authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 activerecord/
11 activerecord/
@@ -1,5 +1,16 @@
## Rails 4.0.0 (unreleased) ##
+* Added `#update_columns` method which updates the attributes from
+ the passed-in hash without calling save, hence skipping validations and
+ callbacks. `ActiveRecordError` will be raised when called on new objects
+ or when at least one of the attributes is marked as read only.
+ post.attributes # => {"id"=>2, "title"=>"My title", "body"=>"My content", "author"=>"Peter"}
+ post.update_columns({title: 'New title', author: 'Sebastian'}) # => true
+ post.attributes # => {"id"=>2, "title"=>"New title", "body"=>"My content", "author"=>"Sebastian"}
+ *Sebastian Martinez*
* Allow before and after validations to take an array of lifecycle events
*John Foley*
Please sign in to comment.
Something went wrong with that request. Please try again.