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

moved the paypal_braintree partial on the correct path #217

Closed
wants to merge 1 commit into from

Conversation

giovantenne
Copy link

No description provided.

@kennyadsl
Copy link
Member

@zener79 can you please explain why this is needed?

@giovantenne
Copy link
Author

giovantenne commented Feb 12, 2019

@kennyadsl This is needed to avoid the error

ActionView::Template::Error (Missing partial spree/api/payments/source_views/_paypal_braintree

fired on solidus_api (2.8.0) app/views/spree/api/orders/_big.json.jbuilder:37

    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:       )   

This error also prevents line_items from being shown in the order page on the backend as the ajax GET request to /api/orders/XXXXXXXX returns a 500 status-code

It seems also related to #167 and to this fix #213

@kennyadsl
Copy link
Member

kennyadsl commented Feb 12, 2019

Oh you are right, that file wasn't in the right position. I'd love to see a regression test for this. Maybe something very similar to what has been done in solidus_affirm:

https://github.com/solidusio-contrib/solidus_affirm/blob/master/spec/requests/spree/api/orders_controller_spec.rb#L3-L29

Also, can you please rebase against master now that specs have been fixed with #216?

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 this pull request may close these issues.

2 participants