From b77dd218ce845f01753d02fcbc2605c9a5ee93e1 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 2 Apr 2010 17:34:48 +0100 Subject: Add Relation extensions --- activerecord/CHANGELOG | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activerecord/CHANGELOG') diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index e379f4f967..e0625c3dbb 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,15 @@ *Rails 3.0.0 [Beta 2] (pending)* +* Add Relation extensions. [Pratik Naik] + + users = User.where(:admin => true).extending(User::AdminPowers) + + latest_users = User.order('created_at DESC') do + def posts_count + Post.count(:user_id => to_a.map(&:id)) + end + end + * To prefix the table names of all models in a module, define self.table_name_prefix on the module. #4032 [Andrew White] * Silenced "SHOW FIELDS" and "SET SQL_AUTO_IS_NULL=0" statements from the MySQL driver to improve log signal to noise ration in development [DHH] -- cgit v1.2.3