Reputation: 71
I have a base model MyAppRecordBase
which inherits from ActiveRecord::Base
and which all other models inherit from.
I used (in config/environments/development.rb
) config.generators.active_record[:parent] = 'MyAppRecordBase'
to make it default. How do I make rails generate model XYZ
to create a migration file for new models (it do all exept creating migration file..)?
Upvotes: 2
Views: 984
Reputation: 71
Well, after searching for solutions, I used ActiveSupport::Concern as mentioned in this answer by @HarishShetty, And it solve it.
Upvotes: 0