Skip to content

Commit

Permalink
Switch last module core extension to class reopen
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Apr 22, 2009
1 parent e9ed44a commit e6eb941
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
13 changes: 0 additions & 13 deletions activesupport/lib/active_support/core_ext/module.rb
Expand Up @@ -10,16 +10,3 @@
require 'active_support/core_ext/module/model_naming'
require 'active_support/core_ext/module/synchronization'
require 'active_support/core_ext/module/setup'

module ActiveSupport
module CoreExtensions
# Various extensions for the Ruby core Module class.
module Module
# Nothing here. Only defined for API documentation purposes.
end
end
end

class Module
include ActiveSupport::CoreExtensions::Module
end
14 changes: 6 additions & 8 deletions activesupport/lib/active_support/core_ext/module/model_naming.rb
Expand Up @@ -10,14 +10,12 @@ def initialize(name)
@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

0 comments on commit e6eb941

Please sign in to comment.