Strip out leading schema name in classify. References #5139. [schoenm@earthlink.net]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Marcel Molina 2006-05-21 15:11:00 +00:00
parent 04fb7c30e3
commit 422cba934c
2 changed files with 5 additions and 1 deletions

@ -1,6 +1,9 @@
*SVN*
* Strip out leading schema name in classify. References #5139. [schoenm@earthlink.net]
* Remove Enumerable#first_match since break(value) handles the use case well enough. [Nicholas Seckar]
Enumerable#first_match was like detect, but instead of returning the matching element, the yielded value returned. For example:
user_xml = adapters(:from => User, :to => Xml).first_match do |adapter|

@ -146,7 +146,8 @@ def tableize(class_name)
end
def classify(table_name)
camelize(singularize(table_name))
# strip out any leading schema name
camelize(singularize(table_name.sub(/.*\./, '')))
end
def foreign_key(class_name, separate_class_name_and_id_with_underscore = true)