Skip to content

Commit

Permalink
fix(app generator): fix default for modelName when collectionName set…
Browse files Browse the repository at this point in the history
…tled as command line option
  • Loading branch information
cueedee committed May 18, 2015
1 parent ed924bd commit 4ad52ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion generators/collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ var CollectionGenerator = generators.Base.extend(
, message: 'What is the model name for this collection?'
, default: function ( answers )
{
return ( youtil.definedToString( this.options.modelName ) || answers.collectionName );
return (
youtil.definedToString( this.options.modelName )
|| answers.collectionName
|| youtil.definedToString( this.options.collectionName )
);

}.bind( this )
, validate: youtil.isIdentifier
, filter: function ( value )
Expand Down

0 comments on commit 4ad52ac

Please sign in to comment.