Reputation: 6090
I'd like to create a route that's like this:
https://example.com/appusers/1/check_for_updates
.
It should basically be a resourced route so that I can do @appuser = Appuser.find(params[:id])
But I can't figure out how to list that in my routes file.
I've tried get 'appusers/:id/check_for_updates'
but that throws an error.
Upvotes: 0
Views: 149
Reputation: 5214
You can do it using :member
resources :appusers do
get :check_for_updates, on: :member
end
Upvotes: 1