提交 a7c6fe4c 编写于 作者: P Piotr Sarnacki

Rename isolated_engine_for to namespace

上级 79bd92b7
......@@ -200,11 +200,11 @@ def endpoint(endpoint = nil)
@endpoint
end
def isolated_engine_for(mod)
_engine = self
def namespace(mod)
_railtie = self
mod.singleton_class.instance_eval do
define_method(:_railtie) do
_engine
_railtie
end
end
end
......
......@@ -338,11 +338,11 @@ def show
assert_equal "/foo", response[2].body
end
test "isolated engine should include only its own routes and helpers" do
test "namespaced engine should include only its own routes and helpers" do
@plugin.write "lib/bukkits.rb", <<-RUBY
module Bukkits
class Engine < ::Rails::Engine
isolated_engine_for Bukkits
namespace Bukkits
end
end
RUBY
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册