Skip to content

Instantly share code, notes, and snippets.

@guinslym
Created January 17, 2014 05:17
Show Gist options
  • Save guinslym/8468754 to your computer and use it in GitHub Desktop.
Save guinslym/8468754 to your computer and use it in GitHub Desktop.
In a migration I have this following: " t.integer :post_count" where can I found in the doc all the attribute that I can give to 'post_*' so that Rails will make the proper sql statement. I mean can I have a t.integer :post_avg ?
class CreateCategories < ActiveRecord::Migration
def change
create_table :categories do |t|
t.string :name, null: false
t.string :slug, null: false
t.integer :post_count, default: 0
t.timestamps
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment