aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/model_naming.rb
diff options
context:
space:
mode:
authorHongli Lai (Phusion) <hongli@phusion.nl>2008-08-27 15:48:14 +0200
committerJeremy Kemper <jeremy@bitsweat.net>2008-08-29 15:15:40 -0700
commit204a8cce88d986fcfafe01ce9ba44818739374c3 (patch)
tree6eb7e01a9b14784d9a06614a29982593a7fb8416 /activesupport/lib/active_support/core_ext/module/model_naming.rb
parent7f179f8540ab92dbd9d3e650b465de5b694d93d4 (diff)
downloadrails-204a8cce88d986fcfafe01ce9ba44818739374c3.tar.gz
rails-204a8cce88d986fcfafe01ce9ba44818739374c3.tar.bz2
rails-204a8cce88d986fcfafe01ce9ba44818739374c3.zip
Move some core extension methods into a module under the ActiveSupport::CoreExtensions namespace, instead of extending core classes directly. This is more friendly for API reference generators.
[#915 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
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.rb10
1 files changed, 5 insertions, 5 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 5518f5417b..3ec4f3ba11 100644
--- a/activesupport/lib/active_support/core_ext/module/model_naming.rb
+++ b/activesupport/lib/active_support/core_ext/module/model_naming.rb
@@ -11,12 +11,12 @@ module ActiveSupport
end
end
- module CoreExt
+ module CoreExtensions
module Module
- module ModelNaming
- def model_name
- @model_name ||= ModelName.new(name)
- end
+ # 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
end