<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>jiikko</author_name>
  <author_url>https://blog.hatena.ne.jp/jiikko/</author_url>
  <blog_title>ツユダクの肉増しのRuby on Railsの初心者で</blog_title>
  <blog_url>https://jiikko.hatenadiary.org/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>仕様が変わり、default_scopeの内容が上書きされずにチェインされるようになった。 4.1より前 class User &lt; ActiveRecord::Base default_scope { where state: 'pending' } scope :active, -&gt; { where state: 'active' } scope :inactive, -&gt; { where state: 'inactive' } end User.all # SELECT &quot;users&quot;.* FROM &quot;users&quot; WHERE &quot;users&quot;.&quot;state&quot; = 'pending' Use…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjiikko.hatenadiary.org%2Fentry%2F20140309%2F1394375964&quot; title=&quot;rails4.1のdefalut_scope - ツユダクの肉増しのRuby on Railsの初心者で&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>2014-03-09 23:39:24</published>
  <title>rails4.1のdefalut_scope</title>
  <type>rich</type>
  <url>https://jiikko.hatenadiary.org/entry/20140309/1394375964</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
