提交 49401f88 编写于 作者: S Sam Stephenson

Subclasses of ActionController::Caching::Sweeper should be Reloadable

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3517 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 f791fe76
*SVN*
* Subclasses of ActionController::Caching::Sweeper should be Reloadable. [Rick Olson]
* Document the :xhr option for verifications. #3666 [leeo]
* Added :only and :except controls to skip_before/after_filter just like for when you add filters [DHH]
......
......@@ -521,9 +521,10 @@ def cache_sweeper(*sweepers)
class Sweeper < ActiveRecord::Observer #:nodoc:
attr_accessor :controller
# ActiveRecord::Observer will mark this class as reloadable even though it should be
# ActiveRecord::Observer will mark this class as reloadable even though it should not be.
# However, subclasses of ActionController::Caching::Sweeper should be Reloadable
def self.included_modules
super() - [ Reloadable ]
self == Sweeper ? super() - [ Reloadable ] : super()
end
def before(controller)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册