diff options
author | Maurizio De Santis <desantis.maurizio@gmail.com> | 2019-01-16 14:16:46 +0100 |
---|---|---|
committer | Maurizio De Santis <desantis.maurizio@gmail.com> | 2019-01-16 14:16:46 +0100 |
commit | 1a098c542dde88e02e810b379251af2aaca0afe3 (patch) | |
tree | 7162108ff03d867e772e43f45f47aa111c9f6720 /activesupport | |
parent | 41ffddbc8b7faec66a26bd48dfd36a9def6cc23f (diff) | |
download | rails-1a098c542dde88e02e810b379251af2aaca0afe3.tar.gz rails-1a098c542dde88e02e810b379251af2aaca0afe3.tar.bz2 rails-1a098c542dde88e02e810b379251af2aaca0afe3.zip |
Remove Decorator pattern in Overriding existing classes examples
Engines guide in the Overriding Models and Controllers section
references the Decorator pattern, which isn't appropriate, since
Decorator pattern is not about reopening existing classes, is about
adding functionality to existing object instances; something that in
Ruby is commonly implemented using Delegators.
Moreover, the suggested naming convention for overrides,
`app/decorators/**/*_decorator*.rb`, conflicts with a naming convention
commonly used for View Model / Presentation Model decorators, adopted
by popular gems such as `draper`, as well as by custom implementations.
Diffstat (limited to 'activesupport')
0 files changed, 0 insertions, 0 deletions