David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said almost 7 years ago on Routing Partials :

Honestly, I've not done any benchmarking.

However, I would assume that if it is loading the route partials, it would add some kind of overhead. That being said, I would also argue that the overhead would be minimal.  Given the number of controllers that gitlab uses and its performance that i've experienced, any kind of overhead would be worth the added maintainability.

Also, I think that this would just be a valid point on a development environment. By default, if you were to change routes in production, you would have to restart the application to pick up the changes.


David Kimura PRO said almost 7 years ago on Routing Partials :

In hindsight, you're right. Either way should work with the latter being more clear.


David Kimura PRO said almost 7 years ago on Routing Partials :

The code will start to get messy. You wouldn't be able to simply extract out the routes into another file. You would have to still use the Rails.application.routes.draw, but then would also need to figure out how to not overwrite what you've already required. The method that I've demonstrated in this episode was fairly unobtrusive.


You could however, do something like this

config.paths["config/routes"] += Dir[Rails.root.join('config/routes/*.rb’)]

And it would probably have a similar effect, however, I don't think that it is as 'clean'.


David Kimura PRO said almost 7 years ago on Bootstrap Framework and Ruby on Rails :

I've been thinking about making a helper gem for bootstrap. Waiting for the official release of v4 or at least a beta ( and time to actually do it ).


David Kimura PRO said almost 7 years ago on Bootstrap Framework and Ruby on Rails :

I saw that during my research. However, it didn't seem to support Bootstrap 4 yet. For < 4, it would definitely be a great option!