diff --git a/bin/spine b/bin/spine index 4f6edfc..5c917c6 100755 --- a/bin/spine +++ b/bin/spine @@ -78,7 +78,9 @@ generators.controllerSpec = function(){ generators.model = function(){ var template = __dirname + "/../templates/model.coffee"; - var values = {name: camelize(fd.basename(argv[1]))}; + camelize(fd.basename(argv[1])); + var config = argv.slice(1); + var values = {config: config.length ? "'" + config.join("', '") + "'" : ""}; var path = expandPath(argv[1], "./app/models/") + ".coffee"; (new Template(template, path, values)).write(); diff --git a/templates/model.coffee b/templates/model.coffee index d5efef9..bee7362 100644 --- a/templates/model.coffee +++ b/templates/model.coffee @@ -1,6 +1,6 @@ Spine = require('spine') class {{name}} extends Spine.Model - @configure '{{name}}' + @configure {{config}} module.exports = {{name}} \ No newline at end of file