aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorAlberto F. Capel <afcapel@gmail.com>2015-07-14 23:47:16 +0100
committerAlberto F. Capel <afcapel@gmail.com>2015-07-20 01:46:03 +0100
commit476e3f552f59d208cb284f509760b44ad780c17a (patch)
tree900866eb6f02b5a5231f53db9dd5c37c03527852 /activerecord/CHANGELOG.md
parent6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a (diff)
downloadrails-476e3f552f59d208cb284f509760b44ad780c17a.tar.gz
rails-476e3f552f59d208cb284f509760b44ad780c17a.tar.bz2
rails-476e3f552f59d208cb284f509760b44ad780c17a.zip
Add #cache_key to ActiveRecord::Relation.
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 3fa24f3837..ba32de497c 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,13 @@
+* Add `cache_key` to ActiveRecord::Relation.
+
+ Example:
+
+ @users = User.where("name like ?", "%Alberto%")
+ @users.cache_key
+ => "/users/query-5942b155a43b139f2471b872ac54251f-3-20150714212107656125000"
+
+ *Alberto Fernández-Capel*
+
* Fix a bug where counter_cache doesn't always work with polymorphic
relations.