diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-11-16 23:36:41 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-11-16 23:36:41 +0530 |
commit | 2530d0eea8eaecd2c61f99225f050ff47973e9a0 (patch) | |
tree | e32d4920a21417e79584c6c7a563a2cb948b4532 /activerecord/CHANGELOG | |
parent | d9f460a39b73fd2cf0f17f523cc4810d0bf44cac (diff) | |
download | rails-2530d0eea8eaecd2c61f99225f050ff47973e9a0.tar.gz rails-2530d0eea8eaecd2c61f99225f050ff47973e9a0.tar.bz2 rails-2530d0eea8eaecd2c61f99225f050ff47973e9a0.zip |
Added default_scope to Base [#1381 state:committed] (Paweł Kondzior)
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r-- | activerecord/CHANGELOG | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index c2299b56ad..c1d7297260 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,3 +1,19 @@ +*2.3.0/3.0* + +* Added default_scope to Base #1381 [Paweł Kondzior]. Example: + + class Person < ActiveRecord::Base + default_scope :order => 'last_name, first_name' + end + + class Company < ActiveRecord::Base + has_many :people + end + + Person.all # => Person.find(:all, :order => 'last_name, first_name') + Company.find(1).people # => Person.find(:all, :order => 'last_name, first_name', :conditions => { :company_id => 1 }) + + *2.2.1 [RC2] (November 14th, 2008)* * Ensure indices don't flip order in schema.rb #1266 [Jordi Bunster] |