spree-decorators
Spree Decorators
Commands below use the Spree CLI form (
spree …, Docker). On a classic Rails app without the CLI (typical pre-5.4), use the native mapping in thespree-projectskill —bin/rails/bundle exec rakefrom the app root, paths without thebackend/prefix.
Decorators let you change existing Spree classes (models, controllers, helpers, services) from your own app without modifying gem source. They're the standard Ruby Module#prepend pattern with a Spree filename convention and a generator.
Read the warning first
Decorators tightly couple your code to Spree internals. They will probably survive a minor upgrade and might survive a major one. The Spree docs are explicit: decorators are for structural changes (add an association, validation, scope, new method). For behavioral changes (callbacks, side effects, post-save sync), use a modern alternative instead.