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
Deprecated delegate_belongs_to #8179
Deprecated delegate_belongs_to #8179
Conversation
@Punkbooster please check all occurrences of those methods https://github.com/spree/spree/search?utf8=%E2%9C%93&q=delegate_belongs_to&type= |
67971f2
to
8d2315d
Compare
8d2315d
to
ca52c0c
Compare
@@ -118,6 +113,22 @@ class Product < Spree::Base | |||
self.whitelisted_ransackable_attributes = %w[description name slug discontinue_on] | |||
self.whitelisted_ransackable_scopes = %w[not_discontinued] | |||
|
|||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use %i or %I for an array of symbols.
@@ -26,6 +21,11 @@ def has_default_price? | |||
!self.default_price.nil? | |||
end | |||
|
|||
|
|||
def find_or_build_default_price |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use empty lines between method definitions.
@@ -26,6 +21,11 @@ def has_default_price? | |||
!self.default_price.nil? | |||
end | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank line detected.
Is there a discussion about why this was deprecated somewhere? |
No description provided.