diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-28 22:49:34 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-28 22:49:34 -0200 |
commit | 39e85b3b90c58449164673909a6f1893cba290b2 (patch) | |
tree | a9d92a6f70cb839bb875e9cc867ed8dec6b5944d /activemodel/test/models | |
parent | e38d310912a610ffe8a0944a533bfb9e5950f3a5 (diff) | |
parent | f862376d169acfe362552787c095ff4b93834f9c (diff) | |
download | rails-39e85b3b90c58449164673909a6f1893cba290b2.tar.gz rails-39e85b3b90c58449164673909a6f1893cba290b2.tar.bz2 rails-39e85b3b90c58449164673909a6f1893cba290b2.zip |
Merge branch 'extract_observers'
Diffstat (limited to 'activemodel/test/models')
-rw-r--r-- | activemodel/test/models/observers.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/activemodel/test/models/observers.rb b/activemodel/test/models/observers.rb deleted file mode 100644 index 3729b3435e..0000000000 --- a/activemodel/test/models/observers.rb +++ /dev/null @@ -1,27 +0,0 @@ -class ORM - include ActiveModel::Observing - - def save - notify_observers :before_save - end - - class Observer < ActiveModel::Observer - def before_save_invocations - @before_save_invocations ||= [] - end - - def before_save(record) - before_save_invocations << record - end - end -end - -class Widget < ORM; end -class Budget < ORM; end -class WidgetObserver < ORM::Observer; end -class BudgetObserver < ORM::Observer; end -class AuditTrail < ORM::Observer - observe :widget, :budget -end - -ORM.instantiate_observers |