1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00

changed class_or_to_s.to_s.classify.constantize to class_or_to_s.to_s.pluralize.classify.constantize; it was causing Inflection errors for me

This commit is contained in:
Alex Sharp 2008-10-20 03:20:32 -05:00 committed by Joe Ferris
parent be5e07dfb6
commit 5c52889a63

View file

@ -223,7 +223,7 @@ class Factory
def class_for (class_or_to_s)
if class_or_to_s.respond_to?(:to_sym)
class_or_to_s.to_s.classify.constantize
class_or_to_s.to_s.pluralize.classify.constantize
else
class_or_to_s
end