Skip to content

Instantly share code, notes, and snippets.

@Alir3z4
Created April 5, 2011 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Alir3z4/904127 to your computer and use it in GitHub Desktop.
Save Alir3z4/904127 to your computer and use it in GitHub Desktop.
Nested Model & Controller & Route
ActiveRecord::Schema.define(:version => 20110221190024) do
create_table "comments", :force => true do |t|
t.string "title"
t.text "body"
t.integer "commentable_id"
t.string "commentable_type"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "comments", ["commentable_id", "commentable_type"], :name => "index_comments_on_commentable_id_and_commentable_type"
create_table "posts", :force => true do |t|
t.string "title"
t.text "body"
t.datetime "created_at"
t.datetime "updated_at"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment