<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kanahebiZ</author_name>
  <author_url>https://blog.hatena.ne.jp/kanahebiZ/</author_url>
  <blog_title>もふもふ技術部</blog_title>
  <blog_url>https://www.mof-mof.co.jp/tech-blog/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>enum</anon>
  </categories>
  <description>ユーザーの権限を管理する際などに、enumを使うことがあると思います。 今回はenumの使い方をまとめてみます。 下準備 1. Gemをインストールする 日本語対応のためのGemです。 gem &quot;enum_help&quot; 2. モデルを作る $ rails g model user 202401001000000_users.rb class CreateUsers &lt; ActiveRecord::Migration[7.1] def change create_table :users do |t| t.string :name t.integer :role, default: 1 t.tim…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mof-mof.co.jp%2Ftech-blog%2F2024%2F10%2F01%2F100000&quot; title=&quot;【日本語対応あり】Railsでenumを使う - もふもふ技術部&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>2024-10-01 10:00:00</published>
  <title>【日本語対応あり】Railsでenumを使う</title>
  <type>rich</type>
  <url>https://www.mof-mof.co.jp/tech-blog/2024/10/01/100000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
