mirror of https://github.com/rails/rails
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
This commit is contained in:
parent
cf718eb707
commit
2dbff3fbc0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue