aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/callbacks_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate `false` as the way to halt AM callbacksclaudiob2015-01-021-3/+13
| | | | | | | | | | Before this commit, returning `false` in an ActiveModel `before_` callback such as `before_create` 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)`.
* Add AM test: after/around callback returning falseclaudiob2014-12-141-4/+15
| | | | | | | | | | | 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_` or `around_` ActiveModel callback returns +false+, then the callback chain **is not halted**. The callback chain in ActiveModel is only halted when a `before_` callback returns `false`.
* Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-011-3/+3
| | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
* fix some typos found in activemodelVipul A M2013-03-181-1/+1
|
* Use run_callbacks; the generated _run_<name>_callbacks method is not a ↵John Firebaugh2011-01-311-2/+2
| | | | | | public interface. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* after_create in ActiveModel should in the order specifiedNeeraj Singh2010-09-271-0/+30
| | | | | | [#5650 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* no callbacks should be created for empty array [#5289 state:resolved]Subba Rao Pasupuleti2010-08-121-0/+14
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Use better assertion methods for testingNeeraj Singh2010-05-191-1/+1
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move ActiveRecord callbacks implementation to ActiveModel and make use of it.José Valim2009-12-281-0/+70
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>