David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 5 years ago on Nested Forms from Scratch with StimulusJS :
I would likely handle it very similar with a Vue controller. The actions on the objects would be slightly modified, but more or less very similar.

David Kimura PRO said over 5 years ago on More on Stripe and Subscriptions :
See if something like this will work. ```customer = current_user.stripe_customer subscription = customer.subscriptions.retrieve(current_user.stripe_subscription_id) subscription.cancel_at_period_end = true subscription.save```

David Kimura PRO said over 5 years ago on More on Stripe and Webhooks :
It looks like you're not getting the stripe token passed in from the form. In the form where the credit card is entered, the `stripeToken` should be added in via the javascript. Make sure you don't have any JS errors. You could try to comment out the form submission so that you can inspect the parameters that it adds in. If its not adding those in properly, that could be why you're getting the errors on the controller.

David Kimura PRO said over 5 years ago on Importing and Exporting CSV Data :
You can do a check if the `request.format.csv?` is true and exclude the `page(params[:page])` method.

David Kimura PRO said over 5 years ago on Is simple_form still useful in 2019 :
I think that it can still be useful with some things. However, recently, I've been limiting my reliance on gems outside of what Rails has provided. I'll still bring them in as needed if they are accomplishing something that either Rails doesn't offer or brings much developer happiness. For other gems, like simple_form, I likely wouldn't develop a new application with it anymore. Part of my reasons behind this is because I've upgraded many Rails applications with newer major and minor versions. The ones that were easiest to upgrade were smaller projects with just a few gems. A few gems that I don't have issues bringing in are friendly_id, devise, pundit, devise, and kaminari (however I may invest in pagy now instead). Over the years of upgrading apps and with what Rails offers today, these gems have been pretty solid and well maintained. Beyond these, I would really think twice about brining in a gem. For example, something like simple_form as you mentioned can be accomplished with form_with. Something like cocoon can be accomplished with StimulusJS.