Join GitHub today
f7b71b2 breaks templates with layout of different template engine #1652
Happened to come across this today when attempting to move from 0.12.0 to 0.12.1 on our production app.
Defining a layout template in the controller, as a symbol, and attempting to render a template of another template type no longer renders the layout. If the layout template is defined as a string + extension (ie, 'layout.erb'), everything renders as normal.
Example code follows that worked properly in 0.12.0 but does not render in 0.12.1
App::App.controllers :my_controller do layout :my_layout # Points to my_layout.erb, will work # if set as: # layout 'my_layout.erb' get :foo, :map => '/foo' do render 'something/foo' # Points to something/foo.slim end end
If this is how configuration will be moving forward, that's fine, but we should document that as it does break functionality present in an existing minor version. Apologies if this has been documented and I failed to notice.