internetsistemas / guides

A guide for programming gracefully.
25 stars 13 forks source link

Be RESTfull as possible, but add a good alternative for routes and custom actions #18

Closed felipefontoura closed 9 years ago

felipefontoura commented 9 years ago

In our best practices we have: https://github.com/internetsistemas/guides/tree/master/best-practices/rubyonrails/controllers#be-restful-as-possible

But in other project were used:

resources :termination_of_contracts, only: [:index, :show] do
  member do
    put :fired
    put :retired
    put :resignation_request
  end
end

This a good alternative, and should be included in the guides.

felipefontoura commented 9 years ago

Merged to Controller's guides.