logo
logo
Sign in

A Simple Way to Decrease Complexity of Routes in Rails

avatar
Dmitriy Reshetov
A Simple Way to Decrease Complexity of Routes in Rails

Here is а pretty simple and elegant solution to decrease complexity of routes in Ruby on Rails applications.

___________________________________________________________________

Sometimes, when you are working with a large codebase, your routes.rb files grow really fast and become very dirty.

There are several things that make your routes file bigger:

  • Customization of devise;
  • Specific gems that mount additional routes (Active Admin, ActionCable);
  • Sidekiq + SidekiqWeb + Basic authentication;
  • Namespaces with APP or API.

All these points lead to one fact  - your file grows and it is getting hard to maintain it.

__________________________________________________________________

 

collect
0
avatar
Dmitriy Reshetov
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more