let's say if we created a model
rails generate model animal name:string birthday:date
and now we want to create another model for it (for example, Dog and Cat), should we again use the rails generate model or just add the files themselves? How do we indicate that Dog should inherit from Animal if we use rails generate model ?
I think that if we use rails generate model instead of adding the model files themselves, unit test files and archive files will be created. A migration file is also added, unless it uses MongoDB, then there will be no migration file.
inheritance ruby-on-rails single-table-inheritance rails-models
太極 者 無極 而 生
source share