Whatever you do, don't autoload Rails `lib/`

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 https://rubyonrails.ba/single/whatever-you-do-don-t-autoload-rails-lib

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles