diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-22 20:05:42 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-22 20:05:42 +0000 |
commit | 34f9d30e399050e776263441ee1d4415d0b2c254 (patch) | |
tree | 104acd17ac26f01436de6149e374ed9b43205e06 /activerecord/CHANGELOG | |
parent | ea8f3f0a3765883c993cdd1c28ae958f097d2632 (diff) | |
download | rails-34f9d30e399050e776263441ee1d4415d0b2c254.tar.gz rails-34f9d30e399050e776263441ee1d4415d0b2c254.tar.bz2 rails-34f9d30e399050e776263441ee1d4415d0b2c254.zip |
Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r-- | activerecord/CHANGELOG | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 3bf9ba5fcf..151333bbb9 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,19 @@ *SVN* +* Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke] + + class Comment < AR:B + def self.search(q) + find(:all, :conditions => ["body = ?", q]) + end + end + + class Post < AR:B + has_many :comments + end + + Post.find(1).comments.search('hi') # => SELECT * from comments WHERE post_id = 1 AND body = 'hi' + * Added migration support for SQLite (using temporary tables to simulate ALTER TABLE) #1771 [Sam Stephenson] * Remove extra definition of supports_migrations? from abstract_adaptor.rb [Nicholas Seckar] |