Skip to content

stefanpenner/host_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It seems view layouts from engines where the controller is also present in the host app do not load in production, but load fine in development.

#Example# Github Repo

###working###

  1. ./script/server
  2. browse to http://localhost:3000/index

###not working###

  1. ./script/server -e production
  2. browse to http://localhost:3000/index

##Explanation## ###Host Application### app/controller/application_controller.rb app/views/layouts/ {empty} app/views/other_controller/index.html.haml @@@ haml %p content of app/view/other_controller/index.html.haml @@@

###Engine### vender/plugins/engine_name/app/controller/application_controller.rb vender/plugins/engine_name/app/controller/other_controller.rb @@@ ruby class OtherController < ApplicationController ... end @@@ vender/plugins/engine_name/app/views/layouts/application.html.haml @@@ ruby %h1 ApplicationController layouts content = yield @@@

###HTML output in production ### does not render the layouts @@@ ruby

content of app/view/other_controller/index.html.haml @@@

###HTML output in development ### renders the layouts @@@ ruby

ApplicationController layouts content

content of app/view/other_controller/index.html.haml @@@

About

rails 2.3rc1 application demonstrating an engine layout issue.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published