rails_upgrader icon indicating copy to clipboard operation
rails_upgrader copied to clipboard

Automate migration of ActiveRecord::Base to ApplicationRecord

Open bronzdoc opened this issue 4 years ago • 0 comments

The rails upgraded already does this kind of "mirgation" with strong params, it would be nice If we can add this other "migration" for going from Rails 4.2 Rails 5-0

class ApplicationRecord < ActiveRecord::Base
  self.abstract_class = true
end

And then update all of your models to inherit from ApplicationRecord instead of ActiveRecord::Base. The only class that inherits from ActiveRecord::Base will be ApplicationRecord.

bronzdoc avatar Mar 05 '21 01:03 bronzdoc