MΓ³dulo 11 Β· Bookings: The Core API β LecciΓ³n 4 de 5 Β· ~11 min
Cancel: Guarding State Transitions
A member route for one specific transition
index, show, and create are three of Rails' seven standard RESTful actions β resources :bookings gives you all seven for free, but only: %i[index show create] in routes.rb deliberately keeps only three. Cancelling isn't update (which would let a client PATCH ANY field, including sneaking status: "completed" in through the back door) β it's its own narrow, named route: