Skip to content

Commit

Permalink
Use plural filename because dashboard generator doesn't use named base
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Feb 23, 2024
1 parent 5db6aba commit 4575d63
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def admin_route
return unless options[:routes]

routes = File.exist?(Rails.root.join("config/routes/admin.rb")) ? Rails.root.join("config/routes/admin.rb") : Rails.root.join("config/routes.rb")
content = "resources :#{plural_route_name}\n"
content = "resources :#{file_name.pluralize}\n"
sentinel = /namespace :#{namespace}.*\n/
indent = File.binread(routes)[/\n(\s*)namespace :#{namespace}/, 1] || ""

Expand Down

0 comments on commit 4575d63

Please sign in to comment.