Skip to content

Instantly share code, notes, and snippets.

@okor
Last active December 10, 2015 18:48
Show Gist options
  • Select an option

  • Save okor/4477144 to your computer and use it in GitHub Desktop.

Select an option

Save okor/4477144 to your computer and use it in GitHub Desktop.
MongoMapper callbacks
# .create()
before_validation
validate
after_validation
before_save
before_create
after_create
after_save
# .save
before_validation
validate
after_validation
before_save
before_update
after_update
after_save
# .update_attributes!
before_validation
validate
after_validation
before_save
before_update
after_update
after_save
# .destroy
before_destroy
after_destroy
# .touch
# * no callabacks *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment