4 ms·
Even that is resourceful routing, just with nested resources. Doing a flat out custom route is even easier: class AsController < ApplicationController
by ryanbrunner 8y ago
Even that is resourceful routing, just with nested resources. Doing a flat out custom route is even easier:
class AsController < ApplicationController
def custom
end
end
routes:
resources :as do
member { get :custom }
end
- yxhuvud 8y agoYes, of course. The whole point of my example was that it is possible to do resourceful routing in a single file without having to resort to using custom routes. I try to avoid custom routes whenever possible - in my experience they lead to pain in the long run, more often than not.