rubyonjets / jets

Ruby on Jets
http://rubyonjets.com
MIT License
2.6k stars 181 forks source link

Routes Helper Methods do not generate #622

Closed arturjaworski-htd closed 9 months ago

arturjaworski-htd commented 2 years ago

Checklist

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:

image

The behavior is the same with different settings, I would like to use helper methods in rspec tests.

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 1 year ago

@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
Screenshot 2023-09-13 at 10 37 54 PM

Does this happen on v5? If so ill pick this one up.

tongueroo commented 1 year ago

On v5 they are generated for all CRUD methods. So v5 will close this.

tongueroo commented 9 months ago

Fixed in v5