{"blog_title":"\u3082\u3075\u3082\u3075\u6280\u8853\u90e8","blog_url":"https://www.mof-mof.co.jp/tech-blog/","title":"\u3010\u65e5\u672c\u8a9e\u5bfe\u5fdc\u3042\u308a\u3011Rails\u3067enum\u3092\u4f7f\u3046","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mof-mof.co.jp%2Ftech-blog%2F2024%2F10%2F01%2F100000\" title=\"\u3010\u65e5\u672c\u8a9e\u5bfe\u5fdc\u3042\u308a\u3011Rails\u3067enum\u3092\u4f7f\u3046 - \u3082\u3075\u3082\u3075\u6280\u8853\u90e8\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Rails","enum"],"width":"100%","published":"2024-10-01 10:00:00","author_name":"kanahebiZ","url":"https://www.mof-mof.co.jp/tech-blog/2024/10/01/100000","type":"rich","image_url":null,"provider_name":"Hatena Blog","description":"\u30e6\u30fc\u30b6\u30fc\u306e\u6a29\u9650\u3092\u7ba1\u7406\u3059\u308b\u969b\u306a\u3069\u306b\u3001enum\u3092\u4f7f\u3046\u3053\u3068\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002 \u4eca\u56de\u306fenum\u306e\u4f7f\u3044\u65b9\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3059\u3002 \u4e0b\u6e96\u5099 1. Gem\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b \u65e5\u672c\u8a9e\u5bfe\u5fdc\u306e\u305f\u3081\u306eGem\u3067\u3059\u3002 gem \"enum_help\" 2. \u30e2\u30c7\u30eb\u3092\u4f5c\u308b $ rails g model user 202401001000000_users.rb class CreateUsers < ActiveRecord::Migration[7.1] def change create_table :users do |t| t.string :name t.integer :role, default: 1 t.tim\u2026","author_url":"https://blog.hatena.ne.jp/kanahebiZ/","height":"190","version":"1.0"}