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

Extend product attributes probably referencing the wrong file #5

@trane77

Description

@trane77

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions