diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-06 10:18:51 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-06 10:18:51 +0000 |
commit | 390e6d246ceb76ead8dbcf7b87591f51fc316082 (patch) | |
tree | b8d0e8315472916e90cd74fe26c8e180ba4841cc /activerecord/CHANGELOG | |
parent | 6c5572701aa74c90dc5ee3282f450c1a17207c36 (diff) | |
download | rails-390e6d246ceb76ead8dbcf7b87591f51fc316082.tar.gz rails-390e6d246ceb76ead8dbcf7b87591f51fc316082.tar.bz2 rails-390e6d246ceb76ead8dbcf7b87591f51fc316082.zip |
r2915@asus: jeremy | 2005-11-06 05:02:53 -0800
Rename Base.constrain to Base.with_scope so it doesn't conflict with existing concept of database constraints. Make scoping more robust: uniform method => parameters, validated method names and supported finder parameters, raise exception on nested scopes.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r-- | activerecord/CHANGELOG | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index d13d06585c..97261e4f66 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,14 @@ *SVN* +* Rename Base.constrain to Base.with_scope so it doesn't conflict with existing concept of database constraints. Make scoping more robust: uniform method => parameters, validated method names and supported finder parameters, raise exception on nested scopes. [Jeremy Kemper] Example: + + Comment.with_scope(:find => { :conditions => 'active=true' }, :create => { :post_id => 5 }) do + # Find where name = ? and active=true + Comment.find :all, :conditions => ['name = ?', name] + # Create comment associated with :post_id + Comment.create :body => "Hello world" + end + * Fixed that SQL Server should ignore :size declarations on anything but integer and string in the agnostic schema representation #2756 [Ryan Tomayko] * Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH]. Example: |