| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
| |
onwards.
|
|
|
|
|
|
|
|
|
|
|
| |
`before_validation` and `after_validation` from
ActiveModel::Validation::Callbacks accept an optional `:on` parameter
that was not previously documented or tested. For instance given
before_validation :do_something, on: :create
then `object.valid?(:create)` will invoke `:do_something` while
`object.valid?` or `object.valid?(:anything_else)` will not.
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, returning `false` in an ActiveModel validation
callback such as `before_validation` would halt the callback chain.
After this commit, the behavior is deprecated: will still work until
the next release of Rails but will also display a deprecation warning.
The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
|
|
|
|
|
|
|
|
| |
This stems from https://github.com/rails/rails/pull/17227#discussion_r21641358
It's simply a clarification of the current behavior by which if an
`after_validation` ActiveModel callback returns +false+, then further
`after_` callbacks **are not halted**.
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
ActiveRecord to ActiveModel
[#4653 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|