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

f7b71b2 breaks templates with layout of different template engine #1652

Closed
dphase opened this Issue Apr 9, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@dphase

dphase commented Apr 9, 2014

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.

@ujifgc ujifgc added the bug label Apr 9, 2014

@ujifgc ujifgc closed this in 72acd33 Apr 9, 2014

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Apr 9, 2014

Member

Thanks so much! It really helped to get rid of some very strange and ancient test that has been skipped forever, and very confusing piece of code.

Member

ujifgc commented Apr 9, 2014

Thanks so much! It really helped to get rid of some very strange and ancient test that has been skipped forever, and very confusing piece of code.

@dphase

This comment has been minimized.

Show comment
Hide comment
@dphase

dphase Apr 9, 2014

Perfect! Thanks for the extremely quick response, that's what makes our community so amazing.

dphase commented Apr 9, 2014

Perfect! Thanks for the extremely quick response, that's what makes our community so amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment