Open polyglotdev opened 2 years ago
Thank you for your report! Do you have any error messages like:
Nothing generated as an error but I will see whats in the console for VS Code in the AM
This is the error in developer tools in VS Code 👇🏾
Refused to load the script 'vscode-resource:/Users/dom-hashicorp/.vscode-insiders/extensions/makicamel.rails-routes-navigator-0.1.0/media/script.js' because it violates the following Content Security Policy directive: "script-src 'self' https://*.vscode-cdn.net 'unsafe-inline'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
That's what did render 👆🏾 in VS Code
I get exactly the same as @polyglotdev above (and have done for a while).
Hello @makicamel ! Thank you for this extension. I'm currently seeing the same problem as @andyjeffries. Is there any chance you can get to it at anytime? Thank you!
Many many cases are not handled in the parse
function of routes.ts
.
Regex must be more refined like in this extension : https://github.com/basgren/railways/blob/master/src/net/bitpot/railways/parser/RailsRoutesParser.java. For example, if you have any route that uses redirect(), it will crash.
I get the same thing on a fairly new Rails 7.1 app that has a pretty minimal routes.rb file.
Rails.application.routes.draw do
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
# Can be used by load balancers and uptime monitors to verify that the app is live.
get "up" => "rails/health#show", as: :rails_health_check
get "login" => "sessions#new", as: :login
post "login" => "sessions#create"
delete "logout" => "sessions#destroy", as: :logout
resource :budget
resources :groups
resources :categories # may not be needed
resources :period_categories
resources :investments
resources :debts
resource :net_worth
resources :transactions
resources :settings
# Defines the root path route ("/")
root "budget#index"
end
From a brief look at the code, it appears to be that it really doesn't support Rails restful resources. I tried to change the code to use "bundle exec rails routes -E" which gives a more parseable output of all generated routes but I'm really nowhere near experienced enough in TypeScript or VSCode extensions to debug it enough.
That's what did render 👆🏾 in VS Code
Same here
fwiw I'm having the same problem still :/
Just wondering if I am missing something because I have routes in my
routes.rb
, but none show in extention tab?