<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>LukeSilvia</author_name>
  <author_url>https://blog.hatena.ne.jp/LukeSilvia/</author_url>
  <blog_title>LukeSilvia’s diary</blog_title>
  <blog_url>https://lukesilvia.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>今回、railsでブール型を使った（正確にはmigrationのtypeに:booleanを指定した）ので、Railsでブール型を使う際の注意などをメモしておきます。 ブール型の扱い テーブルのカラムをマイグレーションで定義する際に以下の様にすると、Railsはそのカラムをブール型として扱うようになります。 ブール型カラムの定義 def self.up create_table(:users) do |table| table.column :active, :boolean, :null =&gt; false, :default =&gt; true end end def self.down dro…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flukesilvia.hatenablog.com%2Fentry%2F20080316%2F1205644760&quot; title=&quot;Railsでのブール型(Boolean)の扱い - LukeSilvia’s diary&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>2008-03-16 14:19:20</published>
  <title>Railsでのブール型(Boolean)の扱い</title>
  <type>rich</type>
  <url>https://lukesilvia.hatenablog.com/entry/20080316/1205644760</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
