Last active
December 21, 2015 08:09
-
-
Save kwiest/6275878 to your computer and use it in GitHub Desktop.
Rails engine does not recognize #layout call in production
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
# Rails 3.2.12 | |
# Rails engine | |
# app/controllers/puddy/application_controller.rb | |
modue Puddy | |
class ApplicationController < ActionController::Base | |
layout 'puddy/dashboard' | |
#... | |
end | |
end | |
# lib/puddy/engine.rb | |
module Puddy | |
class Engine < ::Rails::Engine | |
isolate_namespace Puddy | |
end | |
end | |
# On development machine, when rendered: | |
# Rendered vendor/bundle/ruby/2.0.0/bundler/gems/puddy-adcff824a188/app/views/puddy/accounts/index.html.erb within layouts/puddy/dashboard (1.4ms) | |
# On production machine, when rendered: | |
# Rendered .../ruby/1.9.1/bundler/gems/puddy-adcff824a188/app/views/puddy/accounts/index.html.erb within layouts/application (109.0ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment