Skip to content

Conversation

@mdesantis
Copy link
Owner

@mdesantis mdesantis commented Jan 15, 2019

Currently, Engines guide in the Overriding Models and Controllers section references the Decorator pattern, which isn't really 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 custom implementations.

@mdesantis mdesantis force-pushed the less-conflict-prone-engine-override-example branch 2 times, most recently from f228025 to 9c96c74 Compare January 16, 2019 10:58
@mdesantis mdesantis changed the title Guide: less conflict-prone engine override example Guide: remove decorator pattern citations in Overriding existing classes examples Jan 16, 2019
@mdesantis mdesantis force-pushed the less-conflict-prone-engine-override-example branch from 9c96c74 to 79468d6 Compare January 16, 2019 11:00
@mdesantis mdesantis changed the title Guide: remove decorator pattern citations in Overriding existing classes examples Remove Decorator pattern citations in Overriding existing classes examples Jan 16, 2019
@mdesantis mdesantis changed the title Remove Decorator pattern citations in Overriding existing classes examples Remove Decorator pattern references in Overriding existing classes examples Jan 16, 2019
@mdesantis mdesantis changed the title Remove Decorator pattern references in Overriding existing classes examples Remove Decorator pattern citations in Overriding existing classes examples Jan 16, 2019
@mdesantis mdesantis force-pushed the less-conflict-prone-engine-override-example branch from 79468d6 to ee1417c Compare January 16, 2019 11:28
@mdesantis mdesantis changed the title Remove Decorator pattern citations in Overriding existing classes examples Remove Decorator pattern references in Overriding existing classes examples Jan 16, 2019
@mdesantis mdesantis force-pushed the less-conflict-prone-engine-override-example branch from ee1417c to 27567d8 Compare January 16, 2019 13:04
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.
@mdesantis mdesantis force-pushed the less-conflict-prone-engine-override-example branch from 27567d8 to 491525a Compare January 16, 2019 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant