Skip to content

Commit

Permalink
Merge pull request #2494 from jordan-brough/improve-deprecation-message
Browse files Browse the repository at this point in the history
Improve deprecation message for 'deprecated_method_type_override'
  • Loading branch information
jordan-brough authored Jan 10, 2018
2 parents fb8c724 + 4b6ec70 commit 40a56cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/app/models/spree/payment_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def partial_name
# If method_type has been overridden, call it and return the value, otherwise return nil
def deprecated_method_type_override
if method(:method_type).owner != Spree::PaymentMethod
Spree::Deprecation.warn "overriding PaymentMethod#method_type is deprecated and will be removed from Solidus 3.0 (override partial_name instead)", caller
Spree::Deprecation.warn "#{method(:method_type).owner} is overriding PaymentMethod#method_type. This is deprecated and will be removed from Solidus 3.0 (override partial_name instead).", caller[1..-1]
method_type
end
end
Expand Down

0 comments on commit 40a56cd

Please sign in to comment.