Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bshimmin
· 11y ago · 0 comments
Looking at the last example, how does it know that `name` is of type String and `age` is of type Number? Should it not be
$ frodo generate model user name:string age:number
or something?
Comments
[–]
fbonetti
11y ago
In Rails, attributes without an explicit type are `String` by default. Not sure how age became a `Number`, though.
[–]
benatkin
11y ago
I think "Number" is from Mongoose, which is an ODM for MongoDB.
[–]
leemalmac
11y ago
Ooops.... Thank you. Of course, it should be so.