Permalink
Browse files

pass strings to the underscore method

  • Loading branch information...
1 parent 707dfcd commit 59ec4562a2e70df455b2e44a67c340fa5254e26e @tenderlove tenderlove committed Feb 26, 2014
Showing with 3 additions and 3 deletions.
  1. +1 −1 railties/lib/rails/engine.rb
  2. +2 −2 railties/lib/rails/railtie.rb
@@ -371,7 +371,7 @@ def endpoint(endpoint = nil)
end
def isolate_namespace(mod)
- engine_name(generate_railtie_name(mod))
+ engine_name(generate_railtie_name(mod.name))
self.routes.default_scope = { module: ActiveSupport::Inflector.underscore(mod.name) }
self.isolated = true
@@ -183,8 +183,8 @@ def configure(&block)
end
protected
- def generate_railtie_name(class_or_module)
- ActiveSupport::Inflector.underscore(class_or_module).tr("/", "_")
+ def generate_railtie_name(string)
+ ActiveSupport::Inflector.underscore(string).tr("/", "_")
end
# If the class method does not have a method, then send the method call

0 comments on commit 59ec456

Please sign in to comment.