Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spree 4.7 #201

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

spree 4.7 #201

wants to merge 3 commits into from

Conversation

rahul2103
Copy link
Contributor

No description provided.

end
end

::Spree::Admin::ProductsController.prepend(::SpreeRelatedProducts::Spree::Admin::ProductsControllerDecorator)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [109/80]

module SpreeRelatedProducts
module Spree
module Admin
module ProductsControllerDecorator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level module documentation comment.

@@ -0,0 +1,14 @@
module SpreeRelatedProducts

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,3 +1,5 @@
require_dependency 'spree/calculator'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

# Merge in the relation_filter if it's available
result = result.merge(self.class.relation_filter) if relation_filter

# make sure results are in same order as related_ids array (position order)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [83/80]

base.extend ClassMethods
end

module ClassMethods

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level module documentation comment.

module ProductDecorator
def self.prepended(base)
base.has_many :relations, -> { order(:position) }, class_name: 'Spree::Relation', as: :relatable
base.has_many :relation_types, -> { distinct }, class_name: 'Spree::RelationType', through: :relations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [110/80]

module Spree
module ProductDecorator
def self.prepended(base)
base.has_many :relations, -> { order(:position) }, class_name: 'Spree::Relation', as: :relatable

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [104/80]

# frozen_string_literal: true
module SpreeRelatedProducts
module Spree
module ProductDecorator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level module documentation comment.

@@ -0,0 +1,119 @@
# frozen_string_literal: true
module SpreeRelatedProducts

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.

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.

2 participants