<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>omiend</author_name>
  <author_url>https://blog.hatena.ne.jp/omiend/</author_url>
  <blog_title>the industrial</blog_title>
  <blog_url>https://omiend.hatenablog.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>RubyOnRails</anon>
    <anon>Ruby</anon>
    <anon>FactoryBot</anon>
  </categories>
  <description>タイトルだけだと何いってんだか全然わからんですね笑 ちょっと困ってます。 例えばこんなModelがあったとして app/models/Employee.rb class Employee &lt; ActiveRecord::Base # 上司 belongs_to :boss, foreign_key: 'fk_employee_to_boss', optional: true end ※つまりは自己結合 Active Record の関連付け (アソシエーション) | Rails ガイド FactoryBotでこんなデータを作成し spec/factories/Employees.rb Fact…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fomiend.hatenablog.jp%2Fentry%2F2018%2F10%2F14%2F220735&quot; title=&quot;FactoryBotでassociationアリのデータを作成しようとした時、「ActiveModel::MissingAttributeError: can&amp;#39;t write unknown attribute `fk_XXXXXXXX`」といったエラーが出る件について - the industrial&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-10-14 22:07:35</published>
  <title>FactoryBotでassociationアリのデータを作成しようとした時、「ActiveModel::MissingAttributeError: can't write unknown attribute `fk_XXXXXXXX`」といったエラーが出る件について</title>
  <type>rich</type>
  <url>https://omiend.hatenablog.jp/entry/2018/10/14/220735</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
