1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/rails/generators
Genadi Samokovarov e6ed3aaf43 Always genererate models with ApplicationRecord parent
Currently, if we generate a model while
`app/model/application_record.rb` isn't present, we'll end up with a
model with an `ActiveRecord::Base` parent _and_ a newly generated
`app/models/application_record.rb`.

While the behavior for choosing an `ActiveRecord::Base` was chosen for
an easier migration math to 5.0, generating the
`app/model/application_record.rb` file kinda contradicts with it.

In any case, I think we should decide on a behavior and stick to it.
Here, I'm changing the generated parent to always be `ApplicationRecord`
and to always create `app/model/application_record.rb` if it doesn't
exist.
2016-04-28 10:12:06 +03:00
..
active_record Always genererate models with ApplicationRecord parent 2016-04-28 10:12:06 +03:00
active_record.rb Use thor class_option to make the primary_key_type option work 2015-10-23 21:34:07 -02:00