# File lib/factory_girl/factory.rb, line 104 def trait_by_name(name) if existing_attribute = trait_for(name) existing_attribute elsif @parent FactoryGirl.factory_by_name(@parent).trait_by_name(name) else FactoryGirl.trait_by_name(name) end end