diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 07:50:14 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 07:50:14 +0000 |
commit | c8e0e10e28948bce93ea9f28524f917d9e0ea2da (patch) | |
tree | 06888bf6f026e04b46de624e87995b6a7d1527aa /activesupport | |
parent | e3c02d8c66ae3df7a58ba7d76dfc464f26dcff67 (diff) | |
download | rails-c8e0e10e28948bce93ea9f28524f917d9e0ea2da.tar.gz rails-c8e0e10e28948bce93ea9f28524f917d9e0ea2da.tar.bz2 rails-c8e0e10e28948bce93ea9f28524f917d9e0ea2da.zip |
Added documentation for overwrite_params #2146 [Michael Shuerig]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2162 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/inflector.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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) |