Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue with BinaryParser not being exported from mongoose.mongo, ca... #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jspears
Copy link

@jspears jspears commented Apr 10, 2012

...using an exception, and breaking things with newer releases of mongoose.

… causing an exception, and breaking things with newer releases of mongoose.
@danielmahon
Copy link

Thanks for this!

@evanmoran
Copy link

In coffee script!

mongoose = require 'mongoose'

module.exports = (schema, options) ->
  schema.add
    createdAt: Date
    updatedAt: Date

  schema.pre 'save', (next) ->
    now = new Date
    if !@createdAt
      @createdAt = now
    @updatedAt = now
    next()

@fizerkhan
Copy link

Any updates on this issue?

Is Mongoose-types active now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants