Skip to content

Instantly share code, notes, and snippets.

@marceloandrader
Created March 30, 2011 21:31
Show Gist options
  • Select an option

  • Save marceloandrader/895355 to your computer and use it in GitHub Desktop.

Select an option

Save marceloandrader/895355 to your computer and use it in GitHub Desktop.
bug with layout on rails 3 upgraded from 2.3.8
# on application_controller.rb
layout "application"
# on other_controller.rb
# this doesn't work
render :action => :show
# this work
render :action => :show, :layout => "other_layout"
# I've tried on application_controller this:
layout :set_layout
def set_layout
logger.info "setting the layout"
"application"
end
# but i never get the log message
# I try to check which layout is set before rendering with
logger.info "layout: #{self.send :_layout}"
render :action => :show
# the log say layout: application but is not rendered inside that layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment