<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gfx</author_name>
  <author_url>https://blog.hatena.ne.jp/gfx/</author_url>
  <blog_title>Islands in the byte stream</blog_title>
  <blog_url>https://gfx.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>elasticsearch-rails はElasticsearchとRails / ActiveRecordのインテグレーションをしてくれるgemです。 こいつを使っているとき、 特定条件下でモデル同士を比較するテストがコケるようになる という現象に悩まされてきました。pryなどで確認しても、たとえば model_a がes-railsからの返却値であるとき、 model_a == Model.find(model_a.id) がコケるのです。これはクラスのリロードがうまくいっていないからではという示唆を得てSpringを切ると、たしかに再現しなくなりました。そこで elasticsearc…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenablog.com%2Fentry%2F2018%2F03%2F07%2F153255&quot; title=&quot;elasticsearch-rails から返るモデルが同値比較できなくてテストで困る問題 - Islands in the byte stream&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-07 15:32:55</published>
  <title>elasticsearch-rails から返るモデルが同値比較できなくてテストで困る問題</title>
  <type>rich</type>
  <url>https://gfx.hatenablog.com/entry/2018/03/07/153255</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
