Check definition on constant not string

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1250 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 6d0ddd81
......@@ -443,7 +443,7 @@ def cache_sweeper(*sweepers)
end
end
if defined?("ActiveRecord")
if defined?(ActiveRecord::Observer)
class Sweeper < ActiveRecord::Observer
attr_accessor :controller
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册