Skip to content

Commit

Permalink
expiresProperty default to false
Browse files Browse the repository at this point in the history
Default is false to maintain backward compatibility.
  • Loading branch information
ajostergaard committed Jun 29, 2014
1 parent 5da91a7 commit 8403e4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ orm.connect("mysql://username:password@host/database", function(err, db) {
- `modifiedProperty` **string|false**
Determines the name of the property used to store the modified timestamp (default `"modified_at"`). If set to `false`, disables this property.
- `expiresProperty` **string|false**
Determines the name of the property used to store the expiry timestamp (default `"expires_at"`). If set to `false`, disables this property.
Determines the name of the property used to store the expiry timestamp for example `"expires_at"` (default `false`). If set to `false`, disables this property.
- `dbtype` **object**
Allows you to set the type of column used by the DB to allow for custom data types (default `{ type: 'date', time: true }`).
- `now` **function**
Expand Down
2 changes: 1 addition & 1 deletion lib/orm-timestamps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function Plugin(db, opts) {
var options = {
createdProperty: 'created_at',
modifiedProperty: 'modified_at',
expiresProperty: 'expires_at',
expiresProperty: false,
dbtype: { type: 'date', time: true },
now: function() { return new Date(); },
expiry: function() { var d = new Date(); d.setMinutes(d.getMinutes() + 60); return d; },
Expand Down

0 comments on commit 8403e4b

Please sign in to comment.