I am working on a Rails 3.2.21 app and am having an issue with Rails.application.routes.recognize_path and when I have :action in my routes. So for example lets say I have a route:
"/something/:action" => "something#index", action: /index|balloon|hi/
When I do
Rails.application.routes.recognize_path("/something/dude")
instead of getting an exception like I expected it to, I get {controller: "something", action: "dude"}
Why did it ignore my regex constraint?
Aucun commentaire:
Enregistrer un commentaire