Routes Helper Methods do not generate
arturjaworski-htd opened this issue · 3 comments
arturjaworski-htd commented
Checklist
- Upgrade Jets: Are you using the latest version of Jets? This allows Jets to fix issues fast. There's a
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/ - Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.boltops.com
- Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
Software | Version |
---|---|
Operating System | macOS 12.2.1 |
Jets | 3.1.1 |
Ruby | 2.7.5p203 |
Expected Behaviour
Following the Routing Guide it should generate helper methods.
Current Behavior
After executing the command bundle exec jets routes
it gets this result:
Step-by-step reproduction instructions
Code Sample
config/routes.rb
:
Jets.application.routes.draw do
resources :users, only: [] do
collection do
get :me
put :update, to: "users#update", as: :update
post :update_avatar
post :remove_avatar
end
end
end
Solution Suggestion
jeremiahlukus commented
@tongueroo this is something that I have came across as well, url helpers are only generated for GET requests
get "profile", to: "registrations#edit", as: :profile
patch "profile", to: "registrations#update", as: :update_profile
delete "profile", to: "registrations#delete", as: :delete_user
Does this happen on v5? If so ill pick this one up.
tongueroo commented
On v5 they are generated for all CRUD methods. So v5 will close this.
tongueroo commented
Fixed in v5