mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Always initialize @title in caching test to avoid uninitialized instance variable warning
This commit is contained in:
parent
ddc584e89e
commit
7b9f3eb10b
1 changed files with 3 additions and 0 deletions
|
@ -187,6 +187,9 @@ class ActionCachingTestController < CachingController
|
|||
rescue_from(ActiveRecord::RecordNotFound) { head :not_found }
|
||||
end
|
||||
|
||||
# Eliminate uninitialized ivar warning
|
||||
before_filter { @title = nil }
|
||||
|
||||
caches_action :index, :redirected, :forbidden, :if => Proc.new { |c| !c.request.format.json? }, :expires_in => 1.hour
|
||||
caches_action :show, :cache_path => 'http://test.host/custom/show'
|
||||
caches_action :edit, :cache_path => Proc.new { |c| c.params[:id] ? "http://test.host/#{c.params[:id]};edit" : "http://test.host/edit" }
|
||||
|
|
Loading…
Reference in a new issue