diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-04-04 17:34:23 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2010-04-04 17:34:23 +0100 |
commit | 00884a59013a658082dab41da5ff41add31b8c43 (patch) | |
tree | 666b862b08b04c7a3727ee22b2cd1a2561af4e52 /activerecord/test/models | |
parent | 48b2451142355b22de5f8130b3debdd4e53e2ba2 (diff) | |
parent | 7d7e0627a0490b6b4ddb0ee5429264ccd46f1245 (diff) | |
download | rails-00884a59013a658082dab41da5ff41add31b8c43.tar.gz rails-00884a59013a658082dab41da5ff41add31b8c43.tar.bz2 rails-00884a59013a658082dab41da5ff41add31b8c43.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/post.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index 704313649a..d092c4bf09 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -1,4 +1,10 @@ class Post < ActiveRecord::Base + module NamedExtension + def author + 'lifo' + end + end + scope :containing_the_letter_a, where("body LIKE '%a%'") scope :ranked_by_comments, order("comments_count DESC") scope :limit_by, lambda {|l| limit(l) } |