jakemumu
08/08/2022, 4:01 PMNameError: uninitialized constant SolidusRelatedProducts::Product::RSpec but only during a heroku deploy -- anyone seen such a thing?Jared Norman
jakemumu
08/08/2022, 4:04 PMjakemumu
08/08/2022, 4:06 PMjakemumu
08/08/2022, 4:06 PMoverrides = Rails.root.join('**/decorators')
Rails.autoloaders.main.ignore(overrides)
config.to_prepare do
Dir.glob("#{overrides}/**/*.rb").each do |override|
load override
end
endjakemumu
08/08/2022, 4:07 PMjakemumu
08/08/2022, 4:08 PMspec/decorators folder in the gem... must be thisJared Norman
jakemumu
08/08/2022, 4:08 PMjakemumu
08/08/2022, 4:08 PMmodels/decorators or controllers/decorators to decorate the solidus stuffJared Norman
overrides = Rails.root.join('app/**/decorators')jakemumu
08/08/2022, 4:10 PMjakemumu
08/08/2022, 4:10 PMjakemumu
08/08/2022, 4:13 PMjakemumu
08/08/2022, 4:14 PMAlec van Niekerk
08/08/2022, 4:14 PMapp/overrides exists (and is already included in the loader), and in there you can add directories for models, controller, etc that you want to override.
Part of the reasoning behind this that I read was firstly to standardise how overrides are done, but also to distinguish between overrides and decorators a little more.
I'm not a contributor so anyone please correct me if I'm wrong.Jared Norman
jakemumu
08/08/2022, 4:16 PMjakemumu
08/08/2022, 4:16 PM