Commit Graph

8 Commits

Author SHA1 Message Date
yhirano cfe4d33733 Refactor generator for TestUnit, RSpec (#816)
* Refactor generator for TestUnit

* Refactor generators for RSpec

* Refactor source_root for cosme
2017-07-20 08:51:30 -05:00
C.J. Howard a1d854a7f4 ApplicationDecorator generator (#796)
* un-skip test and remove unused class definition

* fix build

* add InstallGenerator

* re-namespace generators

* remove module namespacing

* update README with new generator command

* inherit from Base instead of NamedBase

* add inheritance line to Generators section of README

* call #copy_file instead of #template

* remove skip functionality

* refactor once-used variable

* specify application_decorator.rb file instead of class

* move decorator generator back to rails namespace

* revert README change

* specify decorator class

* re-word template help text

* remove unnecessary describe block

* remove delegate_all from application_decorator template

* edit README
2017-04-05 13:43:27 -05:00
Azul cd4f298987 hook in generator from controller generator
* use hook instead of invoke so it's easy to configure
* hook into controller_generator and scaffold_controller_generator
  This feels more natural than invoking from the resource generator.

Decorators are closely related to controllers, views and helpers.
So they should be generated in that context.
If controller generation is disabled for say generating resources there
is no point in creating decorators.
2013-06-07 21:42:50 +02:00
Vasiliy Ermolovich 49f01d9086 rework generators 2012-04-28 23:02:22 +03:00
Vasiliy Ermolovich 24ba88eb1c add new lines 😓 2012-04-25 23:12:30 +03:00
Steve Klabnik 56ce55addb Zomg removing trailing whitespace. 2012-02-13 10:24:31 -05:00
Alexander Pauly 94ecaaf643 Added callback to the generator to enable chaining 2011-09-14 19:57:16 +02:00
Alexander Pauly 00cec639c0 Added hook for replacing helper generator 2011-09-14 11:06:43 +02:00