Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 390
- Log:
Initial import of Canvass, a donations-based poll application.
- Author:
- rool
- Date:
- Mon Mar 21 14:58:04 +0000 2011
- Size:
- 904 Bytes
1 | ######################################################################## |
2 | # File:: 10_define_auditer_sweeper.rb |
3 | # (C):: Hipposoft 2011 |
4 | # |
5 | # Purpose:: A patch to copy a user's user name directly into an Audit |
6 | # record so that both the User association and the name are |
7 | # present. This makes searching easier and keeps meaningful |
8 | # data available even if the User record is later deleted. |
9 | # |
10 | # See also "app/models/auditer.rb" and |
11 | # "app/controllers/application_controller.rb". |
12 | # ---------------------------------------------------------------------- |
13 | # 24-Feb-2011 (ADH): Created. |
14 | ######################################################################## |
15 | |
16 | class AuditerSweeper < ActionController::Caching::Sweeper |
17 | observe Audit |
18 | |
19 | def before_create( audit ) |
20 | audit.username = audit.user.name unless ( audit.user.nil? ) |
21 | end |
22 | end |