Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed templates formatting

  • Loading branch information...
commit a7e86f0bce7d608ea195d7449724cffa00217203 1 parent 5f7888d
@MiguelMadero authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 templates/scaffold/controller.ejs
View
6 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 {
Please sign in to comment.
Something went wrong with that request. Please try again.