Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (33 sloc) 1.266 kB
var <%= names.constructor.singular %> = function () {
/*
this.property('login', 'string', {required: true});
this.property('password', 'string', {required: true});
this.property('lastName', 'string');
this.property('firstName', 'string');
this.validatesPresent('login');
this.validatesFormat('login', /[a-z]+/, {message: 'Subdivisions!'});
this.validatesLength('login', {min: 3});
// Use with the name of the other parameter to compare with
this.validatesConfirmed('password', 'confirmPassword');
// Use with any function that returns a Boolean
this.validatesWithFunction('password', function (s) {
return s.length > 0;
});
// Can define methods for instances like this
this.someMethod = function () {
// Do some stuff
};
*/
};
/*
// Can also define them on the prototype
<%= names.constructor.singular %>.prototype.someOtherMethod = function () {
// Do some other stuff
};
// Can also define static methods and properties
<%= names.constructor.singular %>.someStaticMethod = function () {
// Do some other stuff
};
<%= names.constructor.singular %>.someStaticProperty = 'YYZ';
*/
<%= names.constructor.singular %> = geddy.model.register('<%= names.constructor.singular %>', <%= names.constructor.singular %>);
Jump to Line
Something went wrong with that request. Please try again.