Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Solidus 2.6 requires spree/api/payments/source_views/_paypal_braintree.json.jbuilder #167

Closed
octave opened this issue May 14, 2018 · 2 comments · Fixed by #270
Closed

Solidus 2.6 requires spree/api/payments/source_views/_paypal_braintree.json.jbuilder #167

octave opened this issue May 14, 2018 · 2 comments · Fixed by #270

Comments

@octave
Copy link

octave commented May 14, 2018

When using solidus 2.6.0rc1, when viewing the shipment tab of an order in the admin in generate an error:

ActionView::Template::Error (Missing partial spree/api/payments/source_views/_paypal_braintree with {:locale=>[:en], :formats=>[:json], :variants=>[], :handlers=>[:jbuilder]}
    34:     payment_source = payment.source.is_a?(Spree::Payment) ? payment.source.source : payment.source
    35: 
    36:     if payment_source
    37:       json.partial!(
    38:         "spree/api/payments/source_views/#{payment.payment_method.partial_name}",
    39:         payment_source: payment_source
    40:       )

It seems to be coming from this change to solidus: solidusio/solidus@6bbe885#diff-44ad61de10149fd0c31668436c9b273b

@prdanelli
Copy link

To sidestep this issue, I added the following to app/views/spree/api/payments/source_views/_paypal_braintree.json.jbuilder:

json.(payment_source, *%i(payment_type))

@ychaker
Copy link

ychaker commented Sep 24, 2018

had the same issue, thank you @prwhitehead for the heads up and the solution. life saver!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants