具有best_in_place的数据表不允许更新

我试图使用带有数据表的best_in_place来允许在线更新表条目。 但是,我已正确呈现所有内容并且可以编辑条目,更改不会持久且与数据库相同并抛出下面的日志。 目前我只想编辑商店ID和地址信息:

Started PUT "/locations/104" for 127.0.0.1 at 2015-05-02 16:15:17 -0400 Started PUT "/locations/104" for 127.0.0.1 at 2015-05-02 16:15:17 -0400 Processing by LocationsController#update as JSON Processing by LocationsController#update as JSON Parameters: {"location"=>{"address"=>"90000"}, "authenticity_token"=>"B0Eshgp8 OCRi5YJQOs+orNRo9VOMmRgyaO4fc3nEDzs=", "id"=>"104"} Parameters: {"location"=>{"address"=>"90000"}, "authenticity_token"=>"B0Eshgp8 OCRi5YJQOs+orNRo9VOMmRgyaO4fc3nEDzs=", "id"=>"104"} ←[1m←[36mLocation Load (0.0ms)←[0m ←[1mSELECT `locations`.* FROM `locations` WHERE `locations`.`id` = 104 LIMIT 1←[0m ←[1m←[36mLocation Load (0.0ms)←[0m ←[1mSELECT `locations`.* FROM `locations` WHERE `locations`.`id` = 104 LIMIT 1←[0m ←[1m←[35m (0.0ms)←[0m BEGIN ←[1m←[35m (0.0ms)←[0m BEGIN ←[1m←[36m (0.0ms)←[0m ←[1mCOMMIT←[0m ←[1m←[36m (0.0ms)←[0m ←[1mCOMMIT←[0m Completed 204 No Content in 8ms (ActiveRecord: 0.0ms) Completed 204 No Content in 8ms (ActiveRecord: 0.0ms) [2015-05-02 16:15:17] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true 

locations.html.erb:

  

Manage Restaurant Locations

id Store Number Address City State Zip Code Major City Bidding Sit Down? Drive Through?
id Store Number Address City State Zip Code Major City Bidding Sit Down? Drive Through?

Upload Restaurant Locations

Simply format your CSV file as the sample:(INSERT EXAMPLE) and upload

位置控制器:

  def update @location = Location.find(params[:id]) @location.update(params[:address]) respond_with @location end private def location_params params.require(:location).permit(:address) end 

locations.js.coffee:

 jQuery -> console.log("locations.coffee loaded") $('.best_in_place').best_in_place()