aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/organization.rb
diff options
context:
space:
mode:
authorMatt Duncan <mrduncan@gmail.com>2009-08-08 20:10:01 -0400
committerMichael Koziarski <michael@koziarski.com>2009-08-09 12:43:07 +1200
commit3b3798506b403911665c3c24fd055b75d6f6a44f (patch)
tree37de7c99f0efbb990cc2f3b62f81c05921ad592b /activerecord/test/models/organization.rb
parent1f6afe4a74bb815a33f41b2d75acd530de6e2eba (diff)
downloadrails-3b3798506b403911665c3c24fd055b75d6f6a44f.tar.gz
rails-3b3798506b403911665c3c24fd055b75d6f6a44f.tar.bz2
rails-3b3798506b403911665c3c24fd055b75d6f6a44f.zip
Adding :from scoping to ActiveRecord calculations
Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1229 state:committed]
Diffstat (limited to 'activerecord/test/models/organization.rb')
-rw-r--r--activerecord/test/models/organization.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/organization.rb b/activerecord/test/models/organization.rb
index d79d5037c8..c85726169e 100644
--- a/activerecord/test/models/organization.rb
+++ b/activerecord/test/models/organization.rb
@@ -1,4 +1,6 @@
class Organization < ActiveRecord::Base
has_many :member_details
has_many :members, :through => :member_details
+
+ named_scope :clubs, { :from => 'clubs' }
end \ No newline at end of file