<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ume1017</author_name>
  <author_url>https://blog.hatena.ne.jp/ume1017/</author_url>
  <blog_title>ume1017’s blog</blog_title>
  <blog_url>https://ume1017.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>現在プログラミングスクールに通い ７０日間でWEBエンジニアになれるよう 勉強中です！ 本日は指定の値がテーブルに存在するか 確認できるexists?メソッドについて書きたいと思います。 間違えていたら申し訳ございません！ ◆exists?メソッド exists?メソッドとは 指定した値がテーブルに存在するかどうか 確認することができるメソッドです。 ◆exists?メソッドの構文 オブジェクト.exists?(値) オブジェクトにテーブルのモデル名を記述。 (値)に確認したい値を記述。 ◆exists?メソッドの使用例 Item.exists?(name: &quot;帽子&quot;) #Itemsテーブルの…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fume1017.hateblo.jp%2Fentry%2F2020%2F09%2F10%2F210602&quot; title=&quot;【Rails】指定した値がテーブルに存在するか確認する方法 - ume1017’s 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>https://cdn-ak.f.st-hatena.com/images/fotolife/u/ume1017/20200910/20200910210543.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-09-10 21:06:02</published>
  <title>【Rails】指定した値がテーブルに存在するか確認する方法</title>
  <type>rich</type>
  <url>https://ume1017.hateblo.jp/entry/2020/09/10/210602</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
