Whatever you do, don't autoload Rails `lib/`
03-May-2023 568
A growing Rails application will accumulate a lot of ruby classes and files that don’t cleanly fit into the default app/ directories of controllers, helpers, jobs, or models. Developers should also be creating new directories in app/* to organize like-with-like files (your app/services/ or app/merchants/, etc.). That’s ok!But frequently there are one-off classes that don’t seem to rise to the level of their own directory in app/. From looking through the cruft of projects like Mastadon or applications I’ve worked on, these files look like:.
Whatever you do, don't autoload Rails `lib/` #ruby #rubydeveloper #rubyonrails #Whatever #don't #autoload #Rails #`lib/` https://rubyonrails.ba/link/whatever-you-do-don-t-autoload-rails-lib