这已经有一段时间,因为我浸在Ruby on Rails和我有一个艰难的时间将数据传输到我的模型,Ruby on Rails的不添加记录到数据库
这里是当我提交的服务器是在说我形式:
Processing ScoresController#index (for 127.0.0.1 at 2010-03-26 15:31:44) [POST]
Parameters: {"commit"=>"Add", "authenticity_token"=>"326dd05ffa596bfa12ec3ebb6f48933dbad8dc0c", "score"=>{"name"=>"third score", "score"=>"4"}}
Score Load (0.5ms) SELECT * FROM "scores" ORDER BY score DESC
Rendering scores/index
Completed in 5ms (View: 2, DB: 0) | 200 OK [http://0.0.0.0/scores]
但记录不被添加到数据库中,我知道这是很简单的东西,但即时通讯难倒,为什么它不工作!
,你可以看到我的github这里的源代码:http://github.com/AlexEdwardFish/Scores/tree/master/app/
eureka!现在工作很好,认为这可能是我的路线订购,我只是不知道是什么。 我更喜欢做它从零开始的艰难的方式,迫使我学习如何做事情,就像这里我现在知道如何使用正确的路线:) – Alex 2010-03-26 17:22:03