Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ziplink breaks since 5.0.8 & route names #75

Open
keineahnung2345 opened this issue May 25, 2023 · 1 comment
Open

ziplink breaks since 5.0.8 & route names #75

keineahnung2345 opened this issue May 25, 2023 · 1 comment

Comments

@keineahnung2345
Copy link
Contributor

In 7c6ddd4#diff-69fcc931d59c5d7ece28397a6444b359dc4a6d2169454a884b1b1ea894ed50c2, it uses url_helpers.more_preview_path to generate path instead.

Using RAILS_ENV=production rails routes -g more_preview to check routes:

      Prefix Verb URI Pattern                                                                   Controller#Action
more_preview GET  /attachments/more_preview/:id/index(.:format)                                 attachments#more_preview {:id=>/[a-z0-9\.\-_]+/, :format=>/[^.]+/}
  more_asset GET  /attachments/more_preview/:id(/*asset).:assetformat(.:format)                 attachments#more_asset {:asset=>/.*/, :id=>/[a-z0-9\.\-_]+/, :format=>/[^.]+/}
             GET  /projects/:id/repository/:repository_id/preview(/*path)@/index(.:format)      repositories#more_preview {:path=>/.*?/, :format=>/[A-Za-z0-9]+/}
             GET  /projects/:id/repository/:repository_id/:rev/preview(/*path)@/index(.:format) repositories#more_preview {:path=>/.*?/, :rev=>/[a-z0-9\.\-_]+/, :format=>/[A-Za-z0-9]+/}

And found that there are only 4 paths instead of 6 defined in config/routes.rb. It seems we need to add :as => to each path in config/routes.rb?

@HugoHasenbein
Copy link
Owner

HugoHasenbein commented May 25, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants