{"provider_name":"Hatena Blog","height":"190","image_url":null,"description":"user\u30e2\u30c7\u30eb\u304c has_one :phone \u3060\u3068\u3057\u3066\u3002 factory :phone do number 00011112222 end factory :user do // fields after(:build) do |user| user.phone ||= FactoryGirl.build(:phone, user: user) end end \u53c2\u8003 http://stackoverflow.com/questions/17034423/factorygirl-has-one-association-and-validation-failed","author_name":"device_me","url":"https://source.hatenadiary.jp/entry/2014/06/22/135031","blog_title":"\u30a2\u30d7\u30ea\u306a\u3069\u3092\u958b\u767a\u3059\u308b\u30d6\u30ed\u30b0","categories":["Ruby on Rails"],"published":"2014-06-22 13:50:31","provider_url":"https://hatena.blog","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsource.hatenadiary.jp%2Fentry%2F2014%2F06%2F22%2F135031\" title=\"FactoryGirl\u3067has_one\u30e2\u30c7\u30eb\u3092\u30c6\u30b9\u30c8\u3059\u308b - \u30a2\u30d7\u30ea\u306a\u3069\u3092\u958b\u767a\u3059\u308b\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","title":"FactoryGirl\u3067has_one\u30e2\u30c7\u30eb\u3092\u30c6\u30b9\u30c8\u3059\u308b","author_url":"https://blog.hatena.ne.jp/device_me/","blog_url":"https://source.hatenadiary.jp/","version":"1.0"}