<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>madogiwa0124</author_name>
  <author_url>https://blog.hatena.ne.jp/madogiwa0124/</author_url>
  <blog_title>Madogiwa Blog</blog_title>
  <blog_url>https://madogiwa0124.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Ruby on Rails</anon>
    <anon>開発</anon>
  </categories>
  <description>こんばんは、まどぎわです(・∀・) RailsアプリケーションでUserモデルにプロパティがモリモリマッチョになっていませんか？？ 例えばこんな感じ。 Userモデル id email password name birthday sex job etc... こうなってくるとプロパティだけでなくて、Userモデルにメソッドもモリモリマッチョにになっちゃう可能性がありますよね・・・！ そういうときは、has_oneを使ってモデルを分割してあげるとスッキリします(・∀・) has_oneとは？ Userモデルを分割する Profileモデルを定義する associationを定義する おわりに …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmadogiwa0124.hatenablog.com%2Fentry%2F2018%2F03%2F25%2F225029&quot; title=&quot;RubyonRails:has_oneで1:1のAssociationを定義し、モデルを適切に分割するメモ - Madogiwa Blog&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-03-25 22:50:29</published>
  <title>RubyonRails:has_oneで1:1のAssociationを定義し、モデルを適切に分割するメモ</title>
  <type>rich</type>
  <url>https://madogiwa0124.hatenablog.com/entry/2018/03/25/225029</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
