Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add test for `:skip_after_callbacks_if_terminated` | claudiob | 2014-12-14 | 1 | -15/+33 |
| | | | | | | | | | | `define_callbacks` from `ActiveSupport::Callbacks` accepts the `:skip_after_callbacks_if_terminated` option since #4866 but the option is not tested anywhere. This commit adds tests and fixes documentation for the option, making it clear that halting a callback chain only stops following `before_` and `around_` callbacks by default. | ||||
* | Unused classes in AS tests | Akira Matsuda | 2013-12-19 | 1 | -21/+0 |
| | |||||
* | remove deprecation notices | Aaron Patterson | 2013-05-15 | 1 | -16/+0 |
| | |||||
* | deprecating string based terminators | Aaron Patterson | 2013-05-14 | 1 | -1/+1 |
| | |||||
* | Merge branch 'master' into normalizecb | Aaron Patterson | 2013-05-14 | 1 | -1/+2 |
|\ | | | | | | | | | | | * master: private callback methods should work Update mail to minimum version 2.5.4 | ||||
| * | private callback methods should work | Aaron Patterson | 2013-05-14 | 1 | -1/+2 |
| | | |||||
* | | Merge branch 'master' into normalizecb | Aaron Patterson | 2013-05-13 | 1 | -0/+40 |
|\| | | | | | | | | | * master: adding more callback type coverage | ||||
| * | adding more callback type coverage | Aaron Patterson | 2013-05-13 | 1 | -0/+40 |
| | | |||||
* | | pass the actual filter, not a string | Aaron Patterson | 2013-05-13 | 1 | -1/+1 |
|/ | |||||
* | add tests for reset_calbacks | Aaron Patterson | 2013-05-13 | 1 | -0/+40 |
| | |||||
* | add test for object conditional with scope | Aaron Patterson | 2013-05-08 | 1 | -0/+19 |
| | |||||
* | adding a class conditional test | Aaron Patterson | 2013-05-08 | 1 | -0/+12 |
| | |||||
* | adding tests for lambdas as conditions | Aaron Patterson | 2013-05-08 | 1 | -0/+40 |
| | |||||
* | we need to indicate the type of callback | Aaron Patterson | 2013-05-08 | 1 | -2/+2 |
| | |||||
* | adding more tests around callback inconsistencies | Aaron Patterson | 2013-05-08 | 1 | -5/+47 |
| | |||||
* | refactor tests for more points | Aaron Patterson | 2013-05-08 | 1 | -4/+5 |
| | |||||
* | adding test to demonstrate inconsistencies in the AS::Callbacks api | Aaron Patterson | 2013-05-08 | 1 | -0/+41 |
| | |||||
* | fix issue #10502, do not recompute method name for already-stringified ↵ | Sean Walbran | 2013-05-07 | 1 | -0/+22 |
| | | | | object filter | ||||
* | Fix typo in test | Vipul A M | 2013-05-02 | 1 | -1/+1 |
| | |||||
* | Fixes skipping object callback filters | Ben McRedmond | 2013-04-04 | 1 | -0/+17 |
| | | | | | | | | | | | | | | | This allows you to skip callbacks that are defined by objects, e.g. for `ActionController`: skip_after_filter MySpecialFilter Previously this didn't work due to a bug in how Rails compared callbacks in `Callback#matches?`. When a callback is compiled, if it's an object filter (i.e. not a method, proc, etc.), `Callback` now defines a method on `@klass` that is derived from the class name rather than `@callback_id`. So, when `skip_callback` tries to find the appropriate callback to remove, `Callback` can regenerate the method name for the filter object and return the correct value for `Callback#matches?`. | ||||
* | Prevent callback from being set twice. | Dmitriy Kiriyenko | 2012-12-20 | 1 | -5/+57 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you add one callack in two separate `set_callback` calls - it is only called once. When you do it in one `set_callback` call - it is called twice. This violates the principle of least astonishment for me. Duplicating callback is usually an error. There is a correct and obvious way to do anything without this "feature". If you want to do before_save :clear_balance, :calculate_tax, :clear_balance or whatever, you should better do before_save :carefully_calculate_tax def carefully_calculate_tax clear_balance calculate_tax clear_balance end And this even opens gates for some advanced refactorings, unlike the first approach. My assumptions are: - Principle of least astonishment is violated, when callbacks are either prevented from duplication, or not. - Duplicating callbacks is usually an error. When it is intentional - it's a smell of a bad design and can be approached without abusing this "feature". My suggestion is: do not allow duplicating callbacks in one callback call, like it is not allowed in separate callbacks call. | ||||
* | Cleanup trailing whitespaces | dfens | 2012-10-12 | 1 | -1/+1 |
| | |||||
* | AS::Callbacks#run_callbacks remove key argument | Francesco Rodriguez | 2012-05-10 | 1 | -3/+3 |
| | |||||
* | AS::Callbacks: deprecate rescuable option | Bogdan Gusiev | 2012-02-22 | 1 | -8/+1 |
| | |||||
* | AS::Callbacks: rip out per_key option. | Bogdan Gusiev | 2012-02-04 | 1 | -7/+23 |
| | |||||
* | Fix GH #4344. A defined callback in extended module is called too. | kennyj | 2012-01-24 | 1 | -0/+56 |
| | |||||
* | removing unnecessary requires | Aaron Patterson | 2012-01-06 | 1 | -1/+0 |
| | |||||
* | use AS::TestCase as the base class | Aaron Patterson | 2012-01-05 | 1 | -12/+12 |
| | |||||
* | Log 'Filter chain halted as CALLBACKNAME rendered or redirected' every time ↵ | José Valim | 2011-11-30 | 1 | -1/+11 |
| | | | | a before callback halts. | ||||
* | Removal require again from tests. | Arun Agrawal | 2011-05-22 | 1 | -1/+0 |
| | |||||
* | Add better test scenario for around callback return results | Aaron Pfeifer | 2011-03-08 | 1 | -0/+10 |
| | |||||
* | Allow access to a callback event's return result from around callbacks | Aaron Pfeifer | 2011-03-08 | 1 | -0/+24 |
| | |||||
* | Use run_callbacks; the generated _run_<name>_callbacks method is not a ↵ | John Firebaugh | 2011-01-31 | 1 | -1/+1 |
| | | | | | | public interface. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | while defining callbacks option :rescuable => true | Neeraj Singh | 2010-12-29 | 1 | -1/+30 |
| | | | | | | | can be passed. There were no tests for this case. This patch adds a test for :rescuable => true option. | ||||
* | Test for after_create callback order in ActiveSupport [#5703 state:resolved] | Neeraj Singh | 2010-09-27 | 1 | -0/+23 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | If certain sections of skip_callback method are commented out then | Neeraj Singh | 2010-08-31 | 1 | -0/+27 |
| | | | | | | | no test was failing. Tests have been added to ensure that commenting out the code within if loop would cause test failure. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Final iteration of use better testing methods | Neeraj Singh | 2010-05-19 | 1 | -1/+1 |
| | | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Added missing requires abstract_unit and activesupport to the loadpath of ↵ | Santiago Pastorino and Sebastian Martinez | 2010-03-18 | 1 | -1/+1 |
| | | | | | | ts_isolated [#4215 state:committed] Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Make sure AS test env doesn't have duplicate libs in load path | Joshua Peek | 2010-02-15 | 1 | -1/+0 |
| | |||||
* | deOMGifying Railties, Active Support, and Action Pack | Mikel Lindsaar | 2010-01-31 | 1 | -4/+4 |
| | |||||
* | Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks | Joshua Peek | 2009-10-12 | 1 | -146/+486 |
| | |||||
* | Remove core ext dependency from test | Jeremy Kemper | 2009-03-24 | 1 | -4/+4 |
| | |||||
* | Allow multiple conditions for callbacks [#1627 state:resolved] | Joshua Peek | 2008-12-28 | 1 | -1/+41 |
| | |||||
* | Simplified and renamed CallbackChain union method to replace_or_append! | Joshua Peek | 2008-08-21 | 1 | -4/+4 |
| | |||||
* | Tidy up ActiveSupport::Callbacks::CallbackChain instance API. | Joshua Peek | 2008-04-17 | 1 | -0/+31 |
| | |||||
* | Refactor filters to use Active Support callbacks. Closes #11235. | Jeremy Kemper | 2008-03-18 | 1 | -0/+21 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Extract ActiveSupport::Callbacks from Active Record, test case setup and ↵ | Jeremy Kemper | 2008-01-19 | 1 | -0/+96 |
teardown, and ActionController::Dispatcher. Closes #10727. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |