diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-16 13:22:57 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-16 13:22:57 +0000 |
commit | 2dbff3fbc0903b828949c57b13e2aa816d187dce (patch) | |
tree | 84a304cd4d66416aeb2a2092a5414f2c5961220d /activerecord/lib | |
parent | cf718eb7071944a331465d35ddcffa41b180e770 (diff) | |
download | rails-2dbff3fbc0903b828949c57b13e2aa816d187dce.tar.gz rails-2dbff3fbc0903b828949c57b13e2aa816d187dce.tar.bz2 rails-2dbff3fbc0903b828949c57b13e2aa816d187dce.zip |
Make it possible to use a regular scope string in addition to the symbol shortcut
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/mixins/list.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/mixins/list.rb b/activerecord/lib/active_record/mixins/list.rb index 16a60d7b6c..a1d914d73c 100644 --- a/activerecord/lib/active_record/mixins/list.rb +++ b/activerecord/lib/active_record/mixins/list.rb @@ -45,7 +45,11 @@ module ActiveRecord end def scope_condition - "#{configuration[:scope]} = \#{#{configuration[:scope]}}" + if configuration[:scope].is_a?(Symbol) + "#{configuration[:scope]} = \#{#{configuration[:scope]}}" + else + configuration[:scope] + end end before_destroy :remove_from_list |