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

Split 'routes.rb' file into multiple small files #1908

Merged

Conversation

aitbw
Copy link
Collaborator

@aitbw aitbw commented Sep 21, 2017

Where

This PR closes #1852 once merged

What

  • Split down routes.rb file into multiple small files to make the application's routes more manageable and easier to customize.

How

The routes that took the most lines on the routes.rb file were separated into their own file under config/routes. An initializer called routing.rb under config/initializers was created to load all the isolated routing files.

Warnings

  • Since this PR rewrites most of the routes.rb file, precaution is advised when merging this commit into a Consul fork with custom routes. If necessary, custom routes can be easily isolated into their own files creating a new file under config/routes/your_custom_routes_file.rb, then appending to the routes.rb file the following: draw :your_custom_routes_file

@voodoorai2000
Copy link
Member

This is Fantastic @aitbw! 🎉

Sorry for taking so long to review and the conflicts that have been created...
Could you solve these conflicts? 🙏

@aitbw
Copy link
Collaborator Author

aitbw commented Jan 9, 2018

Sure @voodoorai2000, no problems 👌

@aitbw aitbw force-pushed the aperez-split-routes-file branch 2 times, most recently from 0104735 to e7ad28c Compare January 9, 2018 19:15
@voodoorai2000
Copy link
Member

Marvellous! 🙌

@voodoorai2000 voodoorai2000 merged commit 43ba27c into consuldemocracy:master Jan 11, 2018
@aitbw aitbw deleted the aperez-split-routes-file branch January 15, 2018 18:37
clairezed pushed a commit to CDJ11/CDJ that referenced this pull request Jun 26, 2018
…-routes-file

Split 'routes.rb' file into multiple small files
javierm pushed a commit to javierm/consul that referenced this pull request Mar 18, 2019
…ing_proposals_headings

Order headings by name and group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Break down routes.rb into smaller files and allow custom routes easily
3 participants