title: Adding Boolean Column Value in Ruby on Rails
body: <p>I am working on a Ruby on Rails  project that creates a web blog. I am looking to add a boolean database field called featured to the Post model. This field should be editable via the active admin interface that I have added.</p>
  
  <p>I used the following code, but I don't even get another column showing up on the website.</p>
  
  <pre><code>$rails generate migration addFeatured featured:boolean
  $rake db:migrate
  </code></pre>
  
  <p>I am very new to Ruby on Rails and would appreciate any help.</p>
  
  <p>The relevant code in my index.html.erb file(views):</p>
  
  <pre><code>&lt;th&gt;Featured Post&lt;/th&gt;
  &lt;td&gt;&lt;%= post.featured %&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Schema.rb:</p>
  
  <pre><code>ActiveRecord::Schema.define(:version =&gt; 20141126015126) do
  
  create_table "active_admin_comments", :force =&gt; true do |t|
   t.string   "namespace"
   t.text     "body"
   t.string   "resource_id",   :null =&gt; false
   t.string   "resource_type", :null =&gt; false
   t.integer  "author_id"
   t.string   "author_type"
   t.datetime "created_at",    :null =&gt; false
   t.datetime "updated_at",    :null =&gt; false
  end
  
  add_index "active_admin_comments", ["author_type", "author_id"], :name =&gt;    "index_active_admin_comments_on_author_type_and_author_id"
  add_index "active_admin_comments", ["namespace"], :name =&gt; "index_active_admin_comments_on_namespace"
  add_index "active_admin_comments", ["resource_type", "resource_id"], :name =&gt; "index_active_admin_comments_on_resource_type_and_resource_id"
  
  create_table "admin_users", :force =&gt; true do |t|
   t.string   "email",                  :default =&gt; "", :null =&gt; false
   t.string   "encrypted_password",     :default =&gt; "", :null =&gt; false
   t.string   "reset_password_token"
   t.datetime "reset_password_sent_at"
   t.datetime "remember_created_at"
   t.integer  "sign_in_count",          :default =&gt; 0
   t.datetime "current_sign_in_at"
   t.datetime "last_sign_in_at"
   t.string   "current_sign_in_ip"
   t.string   "last_sign_in_ip"
   t.datetime "created_at",                             :null =&gt; false
   t.datetime "updated_at",                             :null =&gt; false
  end
  
  add_index "admin_users", ["email"], :name =&gt; "index_admin_users_on_email", :unique =&gt; true
  add_index "admin_users", ["reset_password_token"], :name =&gt; "index_admin_users_on_reset_password_token", :unique =&gt; true
  
  create_table "comments", :force =&gt; true do |t|
   t.string   "commenter"
   t.text     "body"
   t.integer  "post_id"
   t.datetime "created_at", :null =&gt; false
   t.datetime "updated_at", :null =&gt; false
  end
  
  add_index "comments", ["post_id"], :name =&gt; "index_comments_on_post_id"
  
  create_table "posts", :force =&gt; true do |t|
   t.string   "name"
   t.string   "title"
   t.text     "content"
   t.datetime "created_at", :null =&gt; false
   t.datetime "updated_at", :null =&gt; false
  end
  
  end
  </code></pre>