From 3d3b7d7a81300b14ffc3e9117c4b5eb06a5bc20e Mon Sep 17 00:00:00 2001 From: Kudryavtsev Ilya Date: Thu, 30 May 2019 17:42:51 +0300 Subject: [PATCH] Change payment method partial name convention - underscore payment method name --- .../{_storecredit.json.jbuilder => _store_credit.json.jbuilder} | 0 api/spec/requests/spree/api/orders_controller_spec.rb | 2 +- .../{_storecredit.html.erb => _store_credit.html.erb} | 0 .../{_storecredit.html.erb => _store_credit.html.erb} | 0 core/app/models/spree/payment_method.rb | 2 +- 5 files changed, 2 insertions(+), 2 deletions(-) rename api/app/views/spree/api/payments/source_views/{_storecredit.json.jbuilder => _store_credit.json.jbuilder} (100%) rename backend/app/views/spree/admin/payments/source_forms/{_storecredit.html.erb => _store_credit.html.erb} (100%) rename backend/app/views/spree/admin/payments/source_views/{_storecredit.html.erb => _store_credit.html.erb} (100%) diff --git a/api/app/views/spree/api/payments/source_views/_storecredit.json.jbuilder b/api/app/views/spree/api/payments/source_views/_store_credit.json.jbuilder similarity index 100% rename from api/app/views/spree/api/payments/source_views/_storecredit.json.jbuilder rename to api/app/views/spree/api/payments/source_views/_store_credit.json.jbuilder diff --git a/api/spec/requests/spree/api/orders_controller_spec.rb b/api/spec/requests/spree/api/orders_controller_spec.rb index 994ac4a1ee1..b2791b59384 100644 --- a/api/spec/requests/spree/api/orders_controller_spec.rb +++ b/api/spec/requests/spree/api/orders_controller_spec.rb @@ -361,7 +361,7 @@ module Spree it 'renders the payment source view for store credit' do subject - expect(response).to render_template partial: 'spree/api/payments/source_views/_storecredit' + expect(response).to render_template partial: 'spree/api/payments/source_views/_store_credit' end end end diff --git a/backend/app/views/spree/admin/payments/source_forms/_storecredit.html.erb b/backend/app/views/spree/admin/payments/source_forms/_store_credit.html.erb similarity index 100% rename from backend/app/views/spree/admin/payments/source_forms/_storecredit.html.erb rename to backend/app/views/spree/admin/payments/source_forms/_store_credit.html.erb diff --git a/backend/app/views/spree/admin/payments/source_views/_storecredit.html.erb b/backend/app/views/spree/admin/payments/source_views/_store_credit.html.erb similarity index 100% rename from backend/app/views/spree/admin/payments/source_views/_storecredit.html.erb rename to backend/app/views/spree/admin/payments/source_views/_store_credit.html.erb diff --git a/core/app/models/spree/payment_method.rb b/core/app/models/spree/payment_method.rb index c2d9d20aea5..b3ac63b1a14 100644 --- a/core/app/models/spree/payment_method.rb +++ b/core/app/models/spree/payment_method.rb @@ -196,7 +196,7 @@ def display_on # The view that represents your payment method on orders in the backend # def partial_name - deprecated_method_type_override || type.demodulize.downcase + deprecated_method_type_override || type.demodulize.underscore end # :nodoc: