1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix unstated usage of inflector

This commit is contained in:
Jeremy Kemper 2010-03-01 18:52:07 -08:00
parent fc0882ba5a
commit 8bb162f008

View file

@ -1,5 +1,6 @@
require 'rails/initializable'
require 'rails/configuration'
require 'active_support/inflector'
module Rails
class Railtie
@ -23,9 +24,8 @@ module Rails
end
def railtie_name(railtie_name = nil)
@railtie_name ||= name.demodulize.underscore
@railtie_name = railtie_name if railtie_name
@railtie_name
@railtie_name ||= default_name
end
def railtie_names
@ -53,6 +53,10 @@ module Rails
def abstract_railtie?(base)
ABSTRACT_RAILTIES.include?(base.name)
end
def default_name
ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name))
end
end
def rake_tasks