David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said almost 7 years ago on Best Way to Update RUBY and RAILS without breaking your app :

This is such a heavy topic. It first starts with good code coverage! If your application has little or no code coverage, then there is no confidence that things are still working. Before making any major changes, whether it is refactoring or updating to a new Rails version, always make sure that you have adequate coverage.

It is a great topic to cover, but it will also greatly depend on the gems that are used for the application.  There are many gems out there that are slow to be maintained and they do not update for a later Rails support until a month or so after the Rails version has been released.

However, for a standard application with minimal gems used, we can definitely look at my process for updating the Rails version. I have a few tricks which may help mitigate headaches.


David Kimura PRO said almost 7 years ago on Polymorphic Associations :

My guess would be when the type is saved to the database, it is being saved as Authority instead of Wobauth::Authority. Try adding a class_name to the association to see if that makes a difference. The users might be wobauth_users depending where it is declared.

has_many :users, class_name: 'Wobauth::Authority'

David Kimura PRO said almost 7 years ago on Payment with Stripe :

I have two planned already, but these were actually the next series that I was planning. I have seen a lot of tutorials out there that miss some key aspects and want to be sure to cover them. Thanks!


David Kimura PRO said almost 7 years ago on Best Way to Update RUBY and RAILS without breaking your app :

I agree. I am going to try to get this episode out before Rails 5.2 is released.


David Kimura PRO said almost 7 years ago on Page Specific Javascript in Ruby on Rails :

I do think that people and companies should do what they feel is best for them. Though, the same logic can apply to just controllers. Also, you wouldn’t have to create a file for every controller and/or action, just the ones you would want PSJ.

However, I wouldn’t put the JS directly in the views for a few reasons.

In the view, the JS will not be minified or compressed.

The CDN likely won’t cache the results of the page and cause extra bandwidth and load times (minimal but still). 

You lose access to the reuse of JS.