Andrew Brown
ac96a001a8
Fix Stripe subscription errors by migrating deprecated sources API to payment_methods API
...
- Migrate from deprecated sources API to modern payment_methods API in SubscriptionsController
- Update subscription plan modifications to use Subscription.modify instead of direct assignment
- Fix payment method creation/deletion to use PaymentMethod.create/detach instead of sources
- Update view templates to use new payment_methods data structure
- Migrate price.id usage from deprecated plan.id in data integrity tasks
- Add comprehensive test suite with proper Stripe API stubs
- Add missing test gems: rspec-rails, webmock, factory_bot_rails, shoulda-matchers
This resolves Error 500 when users try to upgrade to Premium subscriptions.
The original error was: NoMethodError - undefined method 'total_count' for nil:NilClass
caused by stripe_customer.sources.total_count when sources API returned nil.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 23:40:36 -07:00
Andrew Brown
cc5d686c35
avoid request.env with passenger
2025-02-24 09:44:24 -08:00
Andrew Brown
5ae70beaeb
some anti-spam measures
2024-03-27 14:15:53 -07:00
Andrew Brown
a67c9aef94
add YiR notif task
2023-12-31 17:42:50 -08:00
Andrew Brown
50163a4824
enable items for basil
2023-03-14 16:18:08 -07:00
Andrew Brown
2d88b62adf
use the correct basil bucket oof
2023-03-12 15:50:40 -07:00
Andrew Brown
d7076773bf
do it live
2023-03-12 15:24:16 -07:00
Andrew Brown
6638145c0b
only attach files in the new basil bucket
2023-03-12 15:08:05 -07:00
Andrew Brown
19d62f4597
backend plumbing for saving basil images
2023-03-12 14:43:21 -07:00
drusepth
077714f383
don't trigger model callbacks on wc cache updates
2022-12-01 19:12:39 -08:00
drusepth
30829c4df2
add rake tasks to recompute attribute/page word count caches
2022-12-01 17:21:00 -08:00
drusepth
32945d715d
nasty git merge
2022-05-23 13:49:36 -07:00
drusepth
f2583356af
remove logging and enable live update
2022-04-02 00:39:59 -07:00
drusepth
d6db90adc2
a lil extra reporting
2022-04-01 21:52:29 -07:00
drusepth
18dfbd16ea
add lenience on storage integrity update
2022-04-01 21:29:52 -07:00
drusepth
fb2097bbcc
remove old var
2022-04-01 21:18:03 -07:00
drusepth
b5af01501a
staging dry run
2022-04-01 20:55:18 -07:00
drusepth
81fbfc95ec
extract upload integrity logic to service
2022-04-01 20:10:10 -07:00
drusepth
3875f3dc41
rake task to murder orphan children
2022-03-28 11:44:34 -07:00
drusepth
505d85dd77
unguard integrity rake task
2022-03-20 16:58:03 -07:00
drusepth
d694381be3
no bp = starter
2022-03-10 16:42:52 -08:00
drusepth
a82f7f6c97
handle free-for-lifers
2022-03-10 15:54:38 -08:00
drusepth
81ff2b6436
debugging
2022-03-10 15:14:54 -08:00
drusepth
bdd0c47695
incorporate referral bonuses in integrity task
2022-03-10 15:05:01 -08:00
drusepth
0375e46a08
add data integrity task for upload bandwidths
2022-03-10 14:41:10 -08:00
drusepth
724b1ccc40
Merge branch 'master' into image-opts
2022-01-06 01:30:38 -08:00
drusepth
1e9f8bbd0f
wait a minute before triggering discord notifier so we make sure thread is persisted to db before read
2021-12-23 22:33:07 -08:00
drusepth
d6f1684066
notify discord on new threads
2021-12-22 14:28:05 -08:00
drusepth
ac4d98a8bc
typo
2021-10-26 10:22:11 -07:00
drusepth
89cf300b51
add helpful cache rake task
2021-10-25 21:06:19 -07:00
Andrew Brown
495aa6b073
Merge pull request #1040 from indentlabs/2021-10-07
...
Add word count caches
2021-10-07 23:26:43 -07:00
drusepth
3e0d2210c2
cache aggregated word counts on worldbuilding pages
2021-10-07 17:03:44 -07:00
drusepth
c312d43999
add cached word count to attributes, backfill task
2021-10-07 15:57:16 -07:00
drusepth
118b09febd
fix orphan fix
2021-10-07 14:50:11 -07:00
drusepth
5c61a3d5ea
add rake task for cleaning up orphaned page tags
2021-10-05 01:28:53 -07:00
drusepth
aa9cf696e4
Merge branch 'master' into image-opts
2021-10-04 13:57:58 -07:00
drusepth
fd8d4aa812
migrate card-header asset references to webp instead of jpg
2021-10-04 13:55:00 -07:00
drusepth
4908a4aec5
tee hee, don't use me as a test account for real notifs
2021-10-01 20:51:54 -07:00
drusepth
2505e054c7
ref code
2021-09-29 15:38:05 -07:00
drusepth
fa848f86c4
add rake one_off:trees task for savings notifications
2021-09-29 15:29:32 -07:00
Andrew Brown
0776db4f5a
@-mentioning in forum replies
2021-07-21 02:04:19 -07:00
Andrew Brown
d102da46fe
how could I forget this bad boi
2021-07-20 02:08:16 -07:00
Andrew Brown
99efc2196c
debug info
2021-07-18 23:41:31 -07:00
Andrew Brown
83209e47ea
need this too :)
2021-07-18 19:50:30 -07:00
Andrew Brown
5076029b05
another deityship fix for migration
2021-07-18 19:50:10 -07:00
Andrew Brown
3380627a39
migration fix
2021-07-18 19:00:15 -07:00
Andrew Brown
12029d0913
Merge branch 'master' of github.com:indentlabs/notebook
2021-07-05 23:45:54 -07:00
Andrew Brown
8172a37e62
smaller batch size on wc backfill
2021-07-05 12:29:01 -07:00
Andrew Brown
909cf044a3
add output so heroku doesn't time out
2021-07-05 11:07:29 -07:00
Andrew Brown
5e2e4ff09c
whoopsie syntax
2021-07-05 10:26:06 -07:00