mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:57:36 +08:00
7d01c5de1a
This fixes the problem where if a route ends with a dynamic segment and the segment contains a period e.g. `my.name`, `name` is interpreted as the format. This applies a default format constraints `/(json|html)/` on all routes. If you'd like a route to have a different format constraints, you can do something like this: ```ruby get "your-route" => "your_controlller#method", constraints: { format: /(rss|xml)/ } #or get "your-route" => "your_controlller#method", constraints: { format: :xml } ``` |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |