Skip to content

Commit

Permalink
Change room update method from put to patch
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlON committed Jan 29, 2017
1 parent 88e0a37 commit 1c90a53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
root 'pages#index'
resources :rooms, only: [:index, :new, :create]
get '/rooms/edit' => 'rooms#edit', as: 'edit_room'
put '/rooms' => 'rooms#update'
patch '/rooms' => 'rooms#update'
delete '/rooms' => 'rooms#destroy'
devise_for :users
end
2 changes: 1 addition & 1 deletion spec/controllers/rooms_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
it 'updates current_users room' do
subject.current_user.room = create(:room)

put :update, params: { room: { name: 'Room538' } }
patch :update, params: { room: { name: 'Room538' } }

expect(subject.current_user.room.name).to eq 'Room538'
end
Expand Down

0 comments on commit 1c90a53

Please sign in to comment.