提交 3deb60e6 编写于 作者: C Carlhuda

@layout is a confusing name... use @cache_layout

上级 587f4682
......@@ -112,7 +112,7 @@ def expire_action(options = {})
class ActionCacheFilter #:nodoc:
def initialize(options, &block)
@cache_path, @store_options, @layout =
@cache_path, @store_options, @cache_layout =
options.values_at(:cache_path, :store_options, :layout)
end
......@@ -126,10 +126,10 @@ def filter(controller)
cache_path = ActionCachePath.new(controller, path_options || {})
if cache = controller.read_fragment(cache_path.path, @store_options)
controller._render_cache_fragment(cache, cache_path.extension, @layout == false)
controller._render_cache_fragment(cache, cache_path.extension, @cache_layout == false)
else
yield
controller._save_fragment(cache_path.path, @layout == false, @store_options)
controller._save_fragment(cache_path.path, @cache_layout == false, @store_options)
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册