Skip to content

Commit 37e5427

Browse files
eileencodespixeltrix
authored andcommitted
Check for false in proc
In rails/rails@394b7be parameters set were changed to query strings to behave more like a real browser. In a browser the parameters `false` will never get sent as `false` and will always be `"false"`. Because of this change the test for passing `false` into this `Proc` was failing. We need to change it to check if the layout is not false rather than relying on the value in the parameters.
1 parent 882b02a commit 37e5427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/caching_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ActionCachingTestController < CachingController
4141
caches_action :with_symbol_format, cache_path: 'http://test.host/action_caching_test/with_symbol_format'
4242
caches_action :not_url_cache_path, cache_path: Proc.new { |c| "#{c.params[:action]}_key" }
4343
caches_action :layout_false, layout: false
44-
caches_action :with_layout_proc_param, layout: Proc.new { |c| c.params[:layout] }
44+
caches_action :with_layout_proc_param, layout: Proc.new { |c| c.params[:layout] != "false" }
4545
caches_action :record_not_found, :four_oh_four, :simple_runtime_error
4646
caches_action :streaming
4747
caches_action :invalid

0 commit comments

Comments
 (0)