Closed absmugz closed 3 years ago
@absmugz Thanks for taking a stab at this! It's close -- but what we really want to do here is strip the "-model" if they add it, so that the filename will be correct. We don't actually want to change these files.
For example, if someone does ignite generate model User
we don't want it to name these User
, we still want UserModel
. But we also want it to be UserModel
when they do ignite generate model UserModel
, not UserModelModel
. The easiest way to do that is to strip the final -model
or Model
from the name argument
parameters.first.replace('-model', '');
should do the trick, will revert changes and do that
@absmugz What if someone makes a ignite g model data-modeling-chart
? Your code will change it to dataing-chart
.
Going to close this in favor of Ignite Flame. Thanks @absmugz !
fix model generation adding ModelModel to name on the following :