+1 vote
in Ruby by
In Rails, which code would you use to define a route that handles both the PUT and PATCH REST HTTP verbs?

 a. put :items, include: patch

 b. put 'items', to: 'items#update'

 c. match 'items', to 'items#update', via: [:put, :patch]

 d. match :items, using: put && patch

1 Answer

0 votes
by
In Rails, which code would you use to define a route that handles both the PUT and PATCH REST HTTP verbs?

 Correct answer is :-  match 'items', to 'items#update', via: [:put, :patch]
...