mirror of https://github.com/rails/rails
Delegate application record generator description to orm hooked generator.
This commit is contained in:
parent
fcac1c4c07
commit
f54cbe1f4a
|
@ -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.
|
|
@ -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*
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue