<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tmtms</author_name>
  <author_url>https://blog.hatena.ne.jp/tmtms/</author_url>
  <blog_title>tmtms のメモ</blog_title>
  <blog_url>https://blog.tmtms.net/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>Rails がデータベース層でやってること見るとイライラして精神衛生上良くないから気にしないことにするか。でも気になる。2012-06-06 19:15:40 via TweetDeck ということでやっぱり気になって色々見てしまう自分です。Rails の ActiveRecord でツリー構造を表現するのには awesome_nested_set というプラグインがいいらしいというので使ってみました。awesome_nested_set を使って acts_as_nested_set を指定したモデルにデータを登録すると、次のようなクエリが実行されるようです。 BEGIN; SELECT `…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F20120608%2Frails_awesome_nested_set&quot; title=&quot;Rails の awesome_nested_set がひどい - tmtms のメモ&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>http://a0.twimg.com/profile_images/2261600987/DSC_6963s__normal.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-06-08 00:00:01</published>
  <title>Rails の awesome_nested_set がひどい</title>
  <type>rich</type>
  <url>https://blog.tmtms.net/entry/20120608/rails_awesome_nested_set</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
