0
我对轨道很陌生,正在构建一个简单的应用程序。导轨模型/数据库
- 用户可以通过另一个用户
目前,我有我的模型建立这样创建一个游戏
数字1.在我的文章工作正常。
但我该如何去实现数字2?
数据库目前看起来是这样的:
create_table "games", :force => true do |t|
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|
t.string "name"
t.string "email"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
我还没有尝试过任何东西,因为我不确定从哪里开始。 – steve 2012-03-17 17:35:04
你没有阅读[this](http://stackoverflow.com/questions/how-to-ask)? – 2012-03-17 17:37:05
[This this](http://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx)。 – 2012-03-17 17:40:47