This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.
Message originally sent by slack user U727X2O54PN
Is it possible to refactor files into subfolders without updating the namespacing? Or is there a way I can get an editor like rubymine to update my namespacing for me in a reliable way? Forgive the possibly n00b ruby/rails question here (it’s been a few years since I’ve done this professionally).
Right now doing that move is a PITA since I have to update the namespacing on every file. E.g. if I have app/services/foo.rb and want to move it to app/domain1/services/foo.rb, I have to re-name Foo everywhere as Services::Foo.
Take a look at packs-rails, it lets you achieve a similar result, but instead of doing app/domain1 and app/domain2, you would do packs/domain1/app and packs/domain2/app