Skip to content

[BUG] Pay::Customer#customer no longer exists #1109

Closed Answered by excid3
schristm asked this question in Q&A
Discussion options

You must be logged in to vote

Pay::Customer is an abstract class for single table inheritance, so you will need a Pay::PROCESSOR::Customer object to ask for API records.

You will get a concrete class back when you use Pay::Customer.first:

dummy(test)> Pay::Customer.first
=> #<Pay::Stripe::Customer:0x0000000129b5c7d0>

If you don't, your database needs to be fixed and the type column set on each record. This can happen if you upgraded from an older Pay but didn't backfill the columns as per UPGRADE.md which installs the new migration in your app: https://github.com/pay-rails/pay/blob/main/db/migrate/2_add_pay_sti_columns.rb

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@excid3
Comment options

Answer selected by schristm
@schristm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1108 on November 16, 2024 20:15.