From c8e0e10e28948bce93ea9f28524f917d9e0ea2da Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 9 Sep 2005 07:50:14 +0000 Subject: Added documentation for overwrite_params #2146 [Michael Shuerig] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2162 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/inflector.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index f5c92cf4d9..087c883b0b 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -134,8 +134,7 @@ module Inflector end def foreign_key(class_name, separate_class_name_and_id_with_underscore = true) - Inflector.underscore(Inflector.demodulize(class_name)) + - (separate_class_name_and_id_with_underscore ? "_id" : "id") + underscore(demodulize(class_name)) + (separate_class_name_and_id_with_underscore ? "_id" : "id") end def constantize(camel_cased_word) -- cgit v1.2.3