Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 826 Bytes
1 | module ContentState |
2 | class Unclassified < Base |
3 | include Singleton |
4 | |
5 | def enter_hook(content) |
6 | super |
7 | content[:published] = false |
8 | content[:status_confirmed] = false |
9 | end |
10 | |
11 | def published?(content) |
12 | classify(content).published?(content) |
13 | end |
14 | |
15 | def is_spam?(content) |
16 | classify(content).is_spam?(content) |
17 | end |
18 | |
19 | def classify(content) |
20 | content.state = case content.classify |
21 | when :ham |
22 | Factory.new(:just_presumed_ham) |
23 | when :spam |
24 | Factory.new(:presumed_spam) |
25 | else |
26 | Factory.new(:presumed_spam) |
27 | end |
28 | end |
29 | |
30 | def before_save(feedback) |
31 | classify(feedback) |
32 | end |
33 | |
34 | def to_s |
35 | "Unclassified" |
36 | end |
37 | end |
38 | end |