Commit Graph

84 Commits

Author SHA1 Message Date
ozzyaaron
d5dc02b5e8 Added back the Callback debugging section by interrogating the _*_callbacks method 2011-03-29 11:22:16 +08:00
R.T. Lechow
a1b4d8e7b2 Active Record typos. 2011-03-05 11:56:34 +01:00
Xavier Noria
a96a9a4948 Merge branch 'master' of git://github.com/lifo/docrails 2011-02-02 22:04:11 +01:00
Paco Guzman
5a6f651a6a FIX not using _on_create or _on_update callbacks only _create and _update 2011-02-01 08:37:43 +01:00
John Firebaugh
57bc25c5f8 Use run_callbacks; the generated _run_<name>_callbacks method is not a public interface.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-01-31 19:45:53 -02:00
Jesse Storimer
38d31b0ef0 Correct docs for after_find and after_initialize 2011-01-28 23:40:42 -05:00
Rafael Mendonça França
aec5ef243a Remove doc for debugging callbacks. Methods don't exist in Rails master 2010-10-13 15:59:57 -03:00
Carlos Antonio da Silva
9b610049bb Cleanup deprecation warnings in active record
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-06 13:39:55 +02:00
Jaime Iniesta
5430f5bd06 lifecycle should be two words, life cycle 2010-08-26 14:23:58 +02:00
Aaron Patterson
949c7e2d0e fisting after_rollback and after commit callbacks 2010-08-20 00:06:49 -07:00
Santiago Pastorino
b451de0d6d Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
Neeraj Singh
74f7e172c7 fixing documentation 2010-08-03 04:14:14 -04:00
Xavier Noria
4dc2521028 Merge remote branch 'docrails/master' into 3-0-stable 2010-08-03 02:15:12 +02:00
Neeraj Singh
1ce40ca562 ensuring that description does not exceed 100 columns 2010-08-02 12:25:26 -04:00
José Valim
b613c3cc7b Add an internal (private API) after_touch callback. [#5271 state:resolved] 2010-08-02 16:16:46 +02:00
Xavier Noria
207fa59675 Merge remote branch 'rails/master'
Conflicts:
	actionpack/lib/abstract_controller/base.rb
2010-06-20 23:13:19 +02:00
José Valim
0247995d05 ActiveModel::Validations::Callbacks should not be required by default. 2010-06-19 18:20:02 +02:00
Neeraj Singh
51739d3228 moving before_validation and after_validation functionality from ActiveRecord to ActiveModel
[#4653 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-19 17:59:52 +02:00
Rizwan Reza
4ad6103c4f Adds title and basic description where needed. 2010-06-15 22:41:41 +04:30
Santiago Pastorino and José Ignacio Costa
100f8b2dfc update docs before_validation_on_create => before_validation(:on => :create) 2010-06-07 22:21:28 -03:00
wycats
d916c62cfc eliminate alias_method_chain from ActiveRecord 2010-05-09 02:37:52 +03:00
Xavier Noria
1b898cc946 say something about after_(commit|rollback) in callbacks.rb, the fact that their implementation is elsewhere is not important for rdoc purposes 2010-05-02 00:47:09 +02:00
Jeremy Kemper
86dda361e2 Avoid deprecated String#to_a by using Array.wrap(...) instead of Array(...) 2010-04-10 22:37:36 -07:00
chrisfinne
76d2c455c0 Add debugging documentation for _callback_chain to ActiveRecord::Callback
Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
2010-03-26 14:01:21 +04:30
José Valim
40c4a0036a Ensure deprecated validate methods are invoked when they are private [#3214 status:resolved] 2010-01-18 09:56:36 +01:00
José Valim
0c2d933f36 Ensure before_validation and after_validation accepts :on as option. 2010-01-06 22:24:16 +01:00
José Valim
97a64b6b22 Get rid of DeprecatedCallbacks in ActiveRecord::Associations and finally remove it. 2009-12-30 11:43:34 +01:00
José Valim
6d390671f6 Move ActiveRecord callbacks implementation to ActiveModel and make use of it.
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2009-12-28 16:19:23 -08:00
Joshua Peek
21e7b84621 Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks 2009-10-12 22:15:43 -05:00
José Valim
2ea1d684d9 Refactor new callbacks and AR implementation.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
José Valim
4f37b97033 Changed ActiveRecord to use new callbacks and speed up observers by only notifying events that are actually being consumed.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
Joshua Peek
6dc9ad80e6 Fix warnings in AMo 2009-09-05 19:10:21 -05:00
Pratik Naik
e033b5d037 Merge docrails 2009-07-25 16:03:58 +01:00
Joshua Peek
7c84bbf160 Add wrap_with_notifications helper to AMo observing 2009-07-20 23:57:01 -05:00
Joshua Peek
8f7c657f4b Move observing notify helper into AMo 2009-06-11 13:41:48 -05:00
Joshua Peek
4e50a35fa2 Break up DependencyModule's dual function of providing a "depend_on" DSL and "included" block DSL into separate modules. But, unify both approaches under AS::Concern. 2009-05-28 11:35:36 -05:00
Bryan Helmkamp
a2875bec9a Use DependencyModule for included hooks in ActiveRecord 2009-05-11 22:23:47 -04:00
Pratik Naik
53cd102b39 Merge with docrails 2009-02-24 12:29:25 +00:00
Pratik Naik
39e1ac658e Merge docrails 2009-01-18 18:10:58 +00:00
Michael Lovitt
7a0e7c7270 Fixed broken after_save callback; was being called when before_create was canceled or before_update was canceled
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1735 state:committed]
2009-01-16 10:11:58 +13:00
Pratik Naik
9cb5400871 Merge docrails 2008-10-16 22:13:06 +02:00
Pratik Naik
6ef35461dc Merge docrails 2008-09-03 17:58:47 +01:00
Xavier Noria
e02f0dcc24 Rollback the transaction when a before_* callback returns false.
Previously this would have committed the transaction but not carried out save or destroy operation.

[#891 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-08-24 14:34:24 +02:00
Tarmo Tänav
656f0e7c6c Fix file permissions
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-31 16:36:23 -05:00
Pratik Naik
0432d15164 Merge with docrails. 2008-07-16 13:01:23 +01:00
Lucas Carlson
d20e8dd220 Changing order of equality because comparing certain objects with false raises an error.
>> require 'md5'
=> true
>> MD5.new("Asds") == false
TypeError: can't convert false into String
	from (irb):2:in `=='
	from (irb):2
>> false == MD5.new("Asds")
=> false
2008-07-02 21:24:48 -07:00
Craig Demyanovich
aa17716688 Callbacks fire before notifying observers [#230 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-06-03 13:38:00 -05:00
Pratik Naik
98dc582742 Merge docrails.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-25 12:29:00 +01:00
Jeremy Kemper
6b9448cdd2 Partial updates include only unsaved attributes. Off by default; set YourClass.partial_updates = true to enable.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:10:04 +00:00
Jeremy Kemper
aae37bb4f7 Extract ActiveSupport::Callbacks from Active Record, test case setup and teardown, and ActionController::Dispatcher. Closes #10727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 02:44:45 +00:00