Commit 4fdd49d
Changed files (3)
app
models
db
app/models/category.rb
@@ -0,0 +1,3 @@
+class Category < ActiveRecord::Base
+ attr_accessible :name, :slug
+end
db/migrate/20130608131324_create_categories.rb
@@ -0,0 +1,10 @@
+class CreateCategories < ActiveRecord::Migration
+ def change
+ create_table :categories do |t|
+ t.string :name
+ t.string :slug
+
+ t.timestamps
+ end
+ end
+end
db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130526040312) do
+ActiveRecord::Schema.define(:version => 20130608131324) do
create_table "cakes", :force => true do |t|
t.string "name"
@@ -20,4 +20,11 @@ ActiveRecord::Schema.define(:version => 20130526040312) do
t.string "photo"
end
+ create_table "categories", :force => true do |t|
+ t.string "name"
+ t.string "slug"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
end