Permalink
Browse files

we should be checking if the app is a class

Hopefully `object.class` always returns something that is_a?(Class), so
the previous logic didn't really make sense.
  • Loading branch information...
1 parent 6feb2aa commit 832d2c40df31db7dd6b679b85644089518810638 @tenderlove tenderlove committed Jul 16, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -610,7 +610,7 @@ def app_name(app)
if app.respond_to?(:railtie_name)
app.railtie_name
else
- class_name = app.class.is_a?(Class) ? app.name : app.class.name
+ class_name = app.is_a?(Class) ? app.name : app.class.name
ActiveSupport::Inflector.underscore(class_name).tr("/", "_")
end
end

0 comments on commit 832d2c4

Please sign in to comment.