Skip to content

Commit

Permalink
Refactor static page routes to use scope declaration for improved cla…
Browse files Browse the repository at this point in the history
…rity and maintainability
  • Loading branch information
Tongxin-Sun committed Dec 1, 2024
1 parent 06912a8 commit d8738e4
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,18 @@
resources :points, only: %i[index show create]
end

get 'home' => 'static_pages#home'
get 'about' => 'static_pages#about'
get 'faq' => 'static_pages#faq'
get 'team' => 'static_pages#team'
get 'contributing' => 'static_pages#contributing'
get 'support_us' => 'static_pages#support_us'
get 'terms_of_use' => 'static_pages#terms_of_use'
get 'privacy-policy' => 'static_pages#privacy_policy'
get 'success_stories' => 'static_pages#success_stories'
scope controller: :static_pages do
get 'home'
get 'about'
get 'faq'
get 'team'
get 'contributing'
get 'support_us'
get 'terms_of_use'
get 'privacy-policy'
get 'success_stories'
end

get 'sitemap' => 'sitemap#index', defaults: { format: 'xml' }

namespace :guides do
Expand Down

0 comments on commit d8738e4

Please sign in to comment.