Module: Parse::Object::ValidationCallbackOnSupport
- Included in:
- Parse::Object
- Defined in:
- lib/parse/model/object.rb
Overview
Add support for ‘on: :create` and `on: :update` options in validation callbacks This emulates ActiveRecord’s callback behavior where you can specify:
before_validation :method_name, on: :create
before_validation :method_name, on: :update
The ‘on:` option is transformed into an `if:` condition that checks new?