Permalink
Browse files

Changed templates formatting

  • Loading branch information...
1 parent 5f7888d commit a7e86f0bce7d608ea195d7449724cffa00217203 @MiguelMadero committed Sep 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 templates/scaffold/controller.ejs
@@ -24,7 +24,7 @@ var <%= names.constructor.plural %> = function () {
, <%= names.property.singular %> = geddy.model.<%= names.constructor.singular %>.create(params);
<%= names.property.singular %>.save(function(err, data) {
- if(err) {
+ if (err) {
params.errors = err;
self.transfer('add');
} else {
@@ -56,7 +56,7 @@ var <%= names.constructor.plural %> = function () {
<%= names.property.singular %>.updateAttributes(params);
<%= names.property.singular %>.save(function(err, data) {
- if(err) {
+ if (err) {
params.errors = err;
self.transfer('edit');
} else {
@@ -70,7 +70,7 @@ var <%= names.constructor.plural %> = function () {
var self = this;
geddy.model.<%= names.constructor.singular %>.remove(params.id, function(err) {
- if(err) {
+ if (err) {
params.errors = err;
self.transfer('edit');
} else {

0 comments on commit a7e86f0

Please sign in to comment.