aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-09-13 19:09:01 +0100
committerJon Leighton <j@jonathanleighton.com>2011-09-13 19:09:01 +0100
commit11870117c6d9231b79e8125218728423e9dff207 (patch)
treeb338cd9b232ac0ecb0863463f382cf5b30037436 /activerecord/CHANGELOG
parentd3baa928312a13ddd550a527caa554a49267ce88 (diff)
downloadrails-11870117c6d9231b79e8125218728423e9dff207.tar.gz
rails-11870117c6d9231b79e8125218728423e9dff207.tar.bz2
rails-11870117c6d9231b79e8125218728423e9dff207.zip
Rename first_or_new to first_or_initialize.
For consistency with find_or_initialize_by. Also remove first_or_build alias.
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r--activerecord/CHANGELOG8
1 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index e82906186e..563260dfd0 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -4,10 +4,12 @@ Wed Sep 7 15:25:02 2011 Aaron Patterson <aaron@tenderlovemaking.com>
keys are per process id.
* lib/active_record/connection_adapters/sqlite_adapter.rb: ditto
-* Add first_or_create, first_or_create!, first_or_build and first_or_new methods to Active Record. This is a better approach over the old find_or_create_by dynamic methods because it's clearer which arguments are used to find the record and which are used to create it:
+* Add first_or_create, first_or_create!, first_or_initialize methods to Active Record. This is a
+ better approach over the old find_or_create_by dynamic methods because it's clearer which
+ arguments are used to find the record and which are used to create it:
+
+ User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson")
- User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson", :hot => true)
-
[Andrés Mejía]
* Support bulk change_table in mysql2 adapter, as well as the mysql one. [Jon Leighton]