Rails3: model: user: use ::Query instead of Query
Test fails on Rails 3.0. <pre> Error: test_destroy_should_update_wiki_contents(UserTest): NoMethodError: undefined method `delete_all' for ActiveRecord::AttributeMethods::Query:Module app/models/user.rb:602:in `remove_references_before_destroy' test/unit/user_test.rb:298:in `test_destroy_should_update_wiki_contents' </pre> git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8140 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2afe5bdf57
commit
312ffe43c7
|
@ -599,8 +599,8 @@ class User < Principal
|
||||||
Message.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
|
Message.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
|
||||||
News.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
|
News.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
|
||||||
# Remove private queries and keep public ones
|
# Remove private queries and keep public ones
|
||||||
Query.delete_all ['user_id = ? AND is_public = ?', id, false]
|
::Query.delete_all ['user_id = ? AND is_public = ?', id, false]
|
||||||
Query.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
|
::Query.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
|
||||||
TimeEntry.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
|
TimeEntry.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
|
||||||
Token.delete_all ['user_id = ?', id]
|
Token.delete_all ['user_id = ?', id]
|
||||||
Watcher.delete_all ['user_id = ?', id]
|
Watcher.delete_all ['user_id = ?', id]
|
||||||
|
|
Loading…
Reference in New Issue