aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-03-30 12:44:45 +0100
committerJon Leighton <j@jonathanleighton.com>2012-03-30 12:52:29 +0100
commit13b3c77e393b8fb02588f39e6bfa10c832e251ff (patch)
tree01bbb86cd94d6f18060d70c8a2d7ec8bd85ed0a4 /activerecord/CHANGELOG.md
parent3a8c54396ea3965eb7601501d7bb9618ff305728 (diff)
downloadrails-13b3c77e393b8fb02588f39e6bfa10c832e251ff.tar.gz
rails-13b3c77e393b8fb02588f39e6bfa10c832e251ff.tar.bz2
rails-13b3c77e393b8fb02588f39e6bfa10c832e251ff.zip
Add Relation#find_by and Relation#find_by!
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 1d5b8841e2..26f6093bc2 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,15 @@
## Rails 4.0.0 (unreleased) ##
+* Added `#find_by` and `#find_by!` to mirror the functionality
+ provided by dynamic finders in a way that allows dynamic input more
+ easily:
+
+ Post.find_by name: 'Spartacus', rating: 4
+ Post.find_by "published_at < ?", 2.weeks.ago
+ Post.find_by! name: 'Spartacus'
+
+ *Jon Leighton*
+
* Added ActiveRecord::Base#slice to return a hash of the given methods with
their names as keys and returned values as values.