<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Pocke</author_name>
  <author_url>https://blog.hatena.ne.jp/Pocke/</author_url>
  <blog_title>pockestrap</blog_title>
  <blog_url>https://pocke.hatenablog.com/</blog_url>
  <categories>
    <anon>作ったもの</anon>
    <anon>Ruby</anon>
    <anon>RuboCop</anon>
    <anon>Ruby on Rails</anon>
    <anon>Programming</anon>
  </categories>
  <description>rubocop-rails にRails/UniqueValidationWithoutIndex copを追加しました。 rubocop-railsの次期リリース(おそらくv2.5.0)から利用できます。 github.com これはなに Rails/UniqueValidationWithoutIndex copは、RDBMSのunique indexがついていないカラムに対して、Active Recordのレイヤーでuniquenessバリデーションを書いている場合に警告をします。 たとえば次のバリデーション定義がある時を考えます。 class User &lt; ApplicationRec…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpocke.hatenablog.com%2Fentry%2F2020%2F02%2F18%2F015421&quot; title=&quot;Rails/UniqueValidationWithoutIndex copを追加した - pockestrap&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>2020-02-18 01:54:21</published>
  <title>Rails/UniqueValidationWithoutIndex copを追加した</title>
  <type>rich</type>
  <url>https://pocke.hatenablog.com/entry/2020/02/18/015421</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
