Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 846 Bytes
1 | class Trigger < ActiveRecord::Base |
2 | belongs_to :pending_item, :polymorphic => true |
3 | |
4 | class << self |
5 | def post_action(due_at, item, method='came_due') |
6 | create!(:due_at => due_at, :pending_item => item, |
7 | :trigger_method => method) |
8 | fire |
9 | end |
10 | |
11 | def fire |
12 | destroy_all ['due_at <= ?', Time.now] |
13 | true |
14 | end |
15 | |
16 | def remove(pending_item, conditions = { }) |
17 | return if pending_item.new_record? |
18 | conditions_string = |
19 | conditions.keys.collect{ |k| "(#{k} = :#{k})"}.join(' AND ') |
20 | with_scope(:find => { :conditions => [conditions_string, conditions]}) do |
21 | delete_all(["pending_item_id = ? AND pending_item_type = ?", |
22 | pending_item.id, pending_item.class.to_s]) |
23 | end |
24 | end |
25 | end |
26 | |
27 | def before_destroy |
28 | pending_item.send(trigger_method) |
29 | true |
30 | end |
31 | end |