You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When referencing foos_path from config/sitemap.rb the path that is generated is the default Rails one, /foos (without the trailing slash).
The workaround is to call foos_path(trailing_slash: true), but it would be nice if the sitemap respected the options laid out in for default_url_options, even though these are bundled in action_controller.
The text was updated successfully, but these errors were encountered:
@tosbourn did you figure out a way to do this globally? I just ran into the same issue. Thanks for the trailing_slash: true hunt, I'll do that until I can find a way to do it globally
@dtbaker nope, I've just been adding trailing_slash: true, now the code has a president for it, there isn't a big cognitive burden to doing it on new additions to the file.
With a Rails project setup with the following line in
config/application.rb
You would expect
foos_path
to generate/foos/
When referencing
foos_path
fromconfig/sitemap.rb
the path that is generated is the default Rails one,/foos
(without the trailing slash).The workaround is to call
foos_path(trailing_slash: true)
, but it would be nice if the sitemap respected the options laid out in fordefault_url_options
, even though these are bundled inaction_controller
.The text was updated successfully, but these errors were encountered: