Permalink
Browse files

Make it possible to use a regular scope string in addition to the sym…

…bol shortcut

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Dec 16, 2004
1 parent cf718eb commit 2dbff3fbc0903b828949c57b13e2aa816d187dce
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/lib/active_record/mixins/list.rb
@@ -45,7 +45,11 @@ def position_column
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

0 comments on commit 2dbff3f

Please sign in to comment.