You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Resolvesdrapergem#919.
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.
Resolvesdrapergem#919.
Hi,
I'm working on a project where Controllers and routes are namespaced but models are not.
This is how my scaffold are generated:
When specifying --model-name=Client, it would be great if the decorator wasn't namespaced and also not in a namespace folder, just like the model.
An easy fix would be editing this file: https://github.com/drapergem/draper/blob/master/lib/generators/rails/decorator_generator.rb
and changing
to
and changing
https://github.com/drapergem/draper/blob/master/lib/generators/rails/templates/decorator.rb
To not include ModuleName::ModelNameDecorator: class_name.split("::").last
The text was updated successfully, but these errors were encountered: