mirror of
https://github.com/github/rails.git
synced 2026-02-01 01:34:57 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user