aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/core_ext/string/inflections.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/core_ext/string/inflections.rb')
-rw-r--r--activesupport/lib/core_ext/string/inflections.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/core_ext/string/inflections.rb b/activesupport/lib/core_ext/string/inflections.rb
index 5d1070b00a..aa4ff3a74d 100644
--- a/activesupport/lib/core_ext/string/inflections.rb
+++ b/activesupport/lib/core_ext/string/inflections.rb
@@ -39,6 +39,10 @@ module ActiveSupport #:nodoc:
def foreign_key(separate_class_name_and_id_with_underscore = true)
Inflector.foreign_key(self, separate_class_name_and_id_with_underscore)
end
+
+ def constantize
+ Inflector.constantize(self)
+ end
end
end
end