Browse files

Rename isolated_engine_for to namespace

  • Loading branch information...
1 parent 79bd92b commit a7c6fe4c2a577bd7e9871aa4746d70c0984325db @drogus drogus committed Aug 3, 2010
Showing with 5 additions and 5 deletions.
  1. +3 −3 railties/lib/rails/engine.rb
  2. +2 −2 railties/test/railties/engine_test.rb
View
6 railties/lib/rails/engine.rb
@@ -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
View
4 railties/test/railties/engine_test.rb
@@ -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

0 comments on commit a7c6fe4

Please sign in to comment.