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:
- 1324 Bytes
1 | require 'blacklist_pattern' |
2 | |
3 | class Admin::BlacklistController < Admin::BaseController |
4 | def index |
5 | list |
6 | render_action 'list' |
7 | end |
8 | |
9 | def list |
10 | @blacklist_patterns = BlacklistPattern.find_all |
11 | end |
12 | |
13 | def show |
14 | @blacklist_pattern = BlacklistPattern.find(params[:id]) |
15 | end |
16 | |
17 | def new |
18 | @blacklist_pattern = BlacklistPattern.new |
19 | |
20 | if params[:blacklist_pattern].has_key?('type') |
21 | @blacklist_pattern = case params[:blacklist_pattern][:type] |
22 | when "StringPattern": StringPattern.new |
23 | when "RegexPattern": RegexPattern.new |
24 | end |
25 | end rescue nil |
26 | |
27 | @blacklist_pattern.attributes = params[:blacklist_pattern] |
28 | |
29 | if request.post? and @blacklist_pattern.save |
30 | flash[:notice] = 'BlacklistPattern was successfully created.' |
31 | redirect_to :action => 'list' |
32 | end |
33 | end |
34 | |
35 | def edit |
36 | @blacklist_pattern = BlacklistPattern.find(params[:id]) |
37 | @blacklist_pattern.attributes = params[:blacklist_pattern] |
38 | if request.post? and @blacklist_pattern.save |
39 | flash[:notice] = 'BlacklistPattern was successfully updated.' |
40 | redirect_to :action => 'list' |
41 | end |
42 | end |
43 | |
44 | def destroy |
45 | @blacklist_pattern = BlacklistPattern.find(params[:id]) |
46 | if request.post? |
47 | @blacklist_pattern.destroy |
48 | redirect_to :action => 'list' |
49 | end |
50 | end |
51 | |
52 | end |