Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Extend product attributes probably referencing the wrong file #5

Open
funder7 opened this issue Aug 17, 2021 · 0 comments
Open

Extend product attributes probably referencing the wrong file #5

funder7 opened this issue Aug 17, 2021 · 0 comments

Comments

@funder7
Copy link

funder7 commented Aug 17, 2021

Hi,
I was reading the extend product atttributes guide, and there's something that doesn't look right:

In the code just after the migration, where the ProductDecorator is defined, I can see this path underneath:
File Location: app/models/railsapp_name/spree/product_serializer_decorator.rb (Does not exist by default)

Shouldn't this be named like: app/models/railsapp_name/spree/product_decorator.rb ?
Also I'd expect this:

::Spree::V2::Storefront::Product.prepend RailsappName::Spree::ProductDecorator if ::Spree::V2::Storefront::Product.included_modules.exclude?(RailsappName::Spree::ProductDecorator)

to be like:

::Spree::Product.prepend RailsappName::Spree::ProductDecorator if ::Spree::Product.included_modules.exclude?(RailsappName::Spree::ProductDecorator)

I'm opening an issue instead of doing a PR as I'm not really sure about it.

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant