by troels · 12y ago · 0 comments
/app/factories - for classes which create active record objects
/app/services - for classes which do something I generally don't care about the return value of. Often perfect for background jobs.
/app/decorators - most of these are Draper classes
/app/forms - form objects
and a few others from various other gems. /app/interactors
It's a trivial thing to add new folders like this to autoloading: # add to application.rb
config.autoload_paths += %W(#{config.root}/app/interactors)* https://github.com/rails/rails/blob/3-0-stable/railties/test...
Anything that's generic and re-usable, we put in /lib. This code is normally a prime candidate for gems - only very simple code stays in /lib for very long.