Skip to content

Instantly share code, notes, and snippets.

@t3chnoboy
Last active December 28, 2015 14:09
Show Gist options
  • Select an option

  • Save t3chnoboy/7512645 to your computer and use it in GitHub Desktop.

Select an option

Save t3chnoboy/7512645 to your computer and use it in GitHub Desktop.
sails generate model User name:string password:string email:email age:number --coffee
# User
#
# @module :: Model
# @description :: A short summary of how this model works and what it represents.
# @docs :: http://sailsjs.org/#!documentation/models
module.exports =
attributes: {
#e.g
#nickname: 'string'
name : 'STRING'
password : 'STRING'
email : 'EMAIL'
age : 'NUMBER'
}
@t3chnoboy
Copy link
Author

'sails generate model User name:string password:string email:email age:number --coffee' output

@t3chnoboy
Copy link
Author

Wrong indentation @line 12. Probably a vim-gist plugin issue. Indent is correct when opening generated files in text editor http://cl.ly/image/2o360R290113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment