New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:layout => !request.xhr?
doesn’t fallback to the custom layout option
#563
Comments
FWIW; |
You could try something like: Even set the |
Yeah, workarounds are pretty easy. |
Agreed. Let's change this for 1.4. |
I believe this patch covers the test case: diff --git a/test/templates_test.rb b/test/templates_test.rb
index e426d32..91f8572 100644
--- a/test/templates_test.rb
+++ b/test/templates_test.rb
@@ -34,6 +34,14 @@ class TemplatesTest < Test::Unit::TestCase
File.unlink(layout) rescue nil
end
+ it 'falls back to default layout' do
+ with_default_layout do
+ render_app(:layout => :layout2) { render(:test, :hello, :layout => true) }
+ assert ok?
+ assert_equal "Layout 2!\nHello World!\n", body
+ end
+ end
+
it 'renders String templates directly' do
render_app { render(:test, 'Hello World') }
assert ok? |
Yes, thanks! |
See #574 |
Templates: render should fall back to engine layout #563
@EtienneLem Could you test this again against master? Should be fixed by d8f1d8e |
Oh! It does. Thanks & good job 😉 |
@EtienneLem Mind closing this then? Thanks! |
Or maybe I’m missing something and it’s meant to be that way?
The text was updated successfully, but these errors were encountered: