HTTP request to update rails model from arduino
问题 I have a rails model called "barrel" that has an attribute "gallons". I want to update the "gallons" attribute of certain barrels from an arduino (Boarduino v2.0) and Adafruit CC3000 WiFi module. My rails app is living at port 3000 on my computer. localhost:3000/barrels I made a barrels scaffold, so it has a controller with an update method: # PUT /barrels/1 # PUT /barrels/1.json def update @barrel = Barrel.find(params[:id]) respond_to do |format| if @barrel.update_attributes(params[:barrel])