draper
draper copied to clipboard
Generators: decorators should respect `--model-name`
Description
Decorator will respect --model-name passed to scaffold_controller or controller generator.
That could be of a particular use to solve namespace issues (e.g. when controllers are namespaced and models are not).
The specs have been refactored to reduce and DRY the code.
Testing
- Use
controllerorscaffold_controllergenerator with--model-nameoption. - Check if the generated decorator matches the model name.
To-Dos
- [x] tests
References
- #919