Skip to content

Commit df436ef

Browse files
committed
fix update
1 parent 983cc36 commit df436ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Task < ActiveRecord::Base
3939

4040
post '/tasks/:id', provides: :json do
4141
content_type :json
42-
Task.find(params[:id].to_i).update(completed: params[:completed]).to_json
42+
Task.update(params[:id].to_i, completed: params[:completed]).to_json
4343
end
4444

4545
delete '/tasks/:id' do

0 commit comments

Comments
 (0)