diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/engine.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 85ff09d2af..7f53e2dc72 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -199,6 +199,15 @@ module Rails @endpoint = endpoint if endpoint @endpoint end + + def isolated_engine_for(mod) + _engine = self + mod.singleton_class.instance_eval do + define_method(:_railtie) do + _engine + end + end + end end delegate :middleware, :root, :paths, :to => :config |