Skip to content

Instantly share code, notes, and snippets.

@mikeraimondi
Created June 5, 2013 03:12
Show Gist options
  • Save mikeraimondi/5711363 to your computer and use it in GitHub Desktop.
Save mikeraimondi/5711363 to your computer and use it in GitHub Desktop.
boolean default example
class CreateWidgets < ActiveRecord::Migration
def change
create_table :widgets do |t|
t.string :name, null: false
t.string :description
t.boolean :flanged, default: false
t.timestamps
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment