-
-
Save theDazzler/ce0b212bcaa96610b9c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I want the URL to be /appointments/review/HSGy56GJS67 where the last part is a unique token that identifies the review | |
routes file | |
resources :appointments do | |
collection do | |
get 'review/:review_token', :to => 'appointments#review_appointments' | |
end | |
end | |
rake routes(first column is blank, there is no path for some reason like 'reviews_appointments') | |
GET /appointments/review/:review_token(.:format) appointments#review_appointments | |
html | |
<%= link_to "Rate your appointment", controller: "appointments", action: "review", review_token: @appointment.review_token %> | |
error | |
No route matches {:controller=>"appointments", :action=>"review", :review_token=>"IZ9ubwXxFLrFRsmwKYjKCQ"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment