So I have a route defined like this for my “evisit” controller and “all_messages” action
match "evisits/:token/all_messages" => "evisits#all_messages", :as => :all_evisit_messages
Shows up in rake routes like this:
all_evisit_messages /evisits/:token/all_messages(.:format) {:controller=>"evisits", :action=>"all_messages"}
And I can manually go to it just fine however if I try to redirect to it like so:
redirect_to all_evisit_messages_url(@evisit.token)
I get a “No routes match – Routing Error” as if the route doesn’t exist. I think I defined it correctly… anything I’m missing?
Try doing this instead:
Does that work?