Created
March 30, 2011 21:31
-
-
Save marceloandrader/895355 to your computer and use it in GitHub Desktop.
bug with layout on rails 3 upgraded from 2.3.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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