Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 13
- Log:
Initial import of Typo 2.6.0 sources from a downloaded Tarball.
Typo is a Ruby On Rails based blog engine.
- Author:
- adh
- Date:
- Sat Jul 22 22:25:02 +0100 2006
- Size:
- 695 Bytes
1 | require_dependency 'transforms' |
2 | |
3 | class Comment < ActiveRecord::Base |
4 | belongs_to :article |
5 | |
6 | validates_presence_of :author, :body |
7 | validates_against_spamdb :body, :url, :ip |
8 | validates_age_of :article_id |
9 | |
10 | protected |
11 | |
12 | before_save :correct_url, :make_nofollow, :transform_body, :make_nofollow |
13 | |
14 | def correct_url |
15 | unless url.to_s.empty? |
16 | unless url =~ /^http\:\/\// |
17 | self.url = "http://#{url}" |
18 | end |
19 | end |
20 | end |
21 | |
22 | def make_nofollow |
23 | self.author = nofollowify(author) |
24 | self.body = nofollowify(body) |
25 | end |
26 | |
27 | def transform_body |
28 | # Escape HTML in comments |
29 | self.body_html = HtmlEngine.transform(body, config["comment_text_filter"], [:filter_html]) |
30 | end |
31 | |
32 | end |