diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/model_naming.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/model_naming.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/model_naming.rb b/activesupport/lib/active_support/core_ext/module/model_naming.rb index 3ec4f3ba11..004b96a3c1 100644 --- a/activesupport/lib/active_support/core_ext/module/model_naming.rb +++ b/activesupport/lib/active_support/core_ext/module/model_naming.rb @@ -10,14 +10,12 @@ module ActiveSupport @partial_path = "#{@cache_key}/#{demodulize.underscore}".freeze end end +end - module CoreExtensions - module Module - # Returns an ActiveSupport::ModelName object for module. It can be - # used to retrieve all kinds of naming-related information. - def model_name - @model_name ||= ModelName.new(name) - end - end +class Module + # Returns an ActiveSupport::ModelName object for module. It can be + # used to retrieve all kinds of naming-related information. + def model_name + @model_name ||= ActiveSupport::ModelName.new(name) end end |