Delegate application record generator description to orm hooked generator.

This commit is contained in:
Gannon McGibbon 2022-09-08 13:54:15 -04:00
parent fcac1c4c07
commit f54cbe1f4a
3 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,8 @@
Description:
Generates an `ApplicationRecord` base class for other models to inherit from.
Example:
`bin/rails generate application_record`
This generates the base class. A test is not generated because no
behaviour is included in `ApplicationRecord` by default.

View File

@ -1,3 +1,7 @@
* Delegate application record generator description to orm hooked generator.
*Gannon McGibbon*
* Show BCC recipients when present in Action Mailer previews.
*Akshay Birajdar*

View File

@ -4,6 +4,10 @@ module Rails
module Generators
class ApplicationRecordGenerator < Base # :nodoc:
hook_for :orm, required: true, desc: "ORM to be invoked"
class << self
delegate(:desc, to: :orm_generator)
end
end
end
end