diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-02-26 20:12:09 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-02-26 20:12:09 +0000 |
commit | 1215d54c2f31c4d19b2432ab05751fe2eaec0319 (patch) | |
tree | 52274812525e365405b0e7a769e0a7e3d03f4e9d /activerecord/CHANGELOG | |
parent | 3cfbb4f374cee2d193b80d4cd373e3fd05997027 (diff) | |
download | rails-1215d54c2f31c4d19b2432ab05751fe2eaec0319.tar.gz rails-1215d54c2f31c4d19b2432ab05751fe2eaec0319.tar.bz2 rails-1215d54c2f31c4d19b2432ab05751fe2eaec0319.zip |
Added support for nested scopes (closes #3407) [anna@wota.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 45480170e7..5b5beab6eb 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,21 @@ *SVN* +* Added support for nested scopes #3407 [anna@wota.jp]. Examples: + + Developer.with_scope(:find => { :conditions => "salary > 10000", :limit => 10 }) do + Developer.find(:all) # => SELECT * FROM developers WHERE (salary > 10000) LIMIT 10 + + # inner rule is used. (all previous parameters are ignored) + Developer.with_exclusive_scope(:find => { :conditions => "name = 'Jamis'" }) do + Developer.find(:all) # => SELECT * FROM developers WHERE (name = 'Jamis') + end + + # parameters are merged + Developer.with_scope(:find => { :conditions => "name = 'Jamis'" }) do + Developer.find(:all) # => SELECT * FROM developers WHERE (( salary > 10000 ) AND ( name = 'Jamis' )) LIMIT 10 + end + end + * Fixed db2 connection with empty user_name and auth options #3622 [phurley@gmail.com] * Fixed validates_length_of to work on UTF-8 strings by using characters instead of bytes #3699 [Masao Mutoh] |