Just looking at the guide for upgrading an app to rails 5 [1], and
have a question
In section 2.2 it says the ActiveRecord models now inherit from
ApplicationRecord, so when upgrading one should create
application_record.rb containing
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
However it does not say that one should modify existing models to
derive from this class. I think this is just an omission in the docs,
is that right?
I note that in section 2.4 talking about a similar change to ActiveJob
that it /does/ say to change the base class for existing jobs.
Colin
[1] http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuR8Kt7DdCbt5iip%3Dshf%2BeSeTdVW26JpjrntwimWf3haA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment