Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Consolidate static page routes using a scope declaration #4865

Conversation

Tongxin-Sun
Copy link
Contributor

Because

This PR refactors the routing configuration for static pages in routes.rb by consolidating individual get routes into a single scope declaration for the static_pages controller. This change streamlines the routing, improves readability, and makes future management of static pages more efficient.

This PR

  • Replaced individual get routes for static pages (home, about, faq, team, contributing, support_us, terms_of_use, privacy-policy, success_stories) with a scope declaration for the static_pages controller in routes.rb.

Issue

Closes #4855

Additional Information

NA

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this PR follows the keyword: brief description of change format, using one of the following keywords:
    • Feature - adds new or amends existing user-facing behavior
    • Chore - changes that have no user-facing value, refactors, dependency bumps, etc
    • Fix - bug fixes
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • I have verified all tests and linters pass after making these changes.
  • If this PR addresses an open issue, it is linked in the Issue section
  • If applicable, this PR includes new or updated automated tests

Copy link
Member

@KevinMulhern KevinMulhern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! thanks for contributing @Tongxin-Sun 💪

@KevinMulhern KevinMulhern merged commit 237043e into TheOdinProject:main Dec 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Chore: Consolidate multiple get routes into a single resources declaration for static pages
2 participants