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:
- 1021 Bytes
1 | class AddPermalink < ActiveRecord::Migration |
2 | class BareArticle < ActiveRecord::Base |
3 | include BareMigration |
4 | |
5 | def stripped_title(title) |
6 | # this is a copynpaste of the routine in article.rb |
7 | # so the one in article.rb can change w/o breaking this. |
8 | self.title.gsub(/<[^>]*>/,'').to_url |
9 | end |
10 | end |
11 | |
12 | class BareCategory < ActiveRecord::Base |
13 | include BareMigration |
14 | |
15 | def stripped_name |
16 | # copynpaste from category.rb |
17 | self.name.to_url |
18 | end |
19 | end |
20 | |
21 | def self.up |
22 | STDERR.puts "Adding categories permalink" |
23 | modify_tables_and_update([:add_column, BareCategory, :permalink, :string], |
24 | [:add_index, BareCategory, :permalink]) do |
25 | BareCategory.find_and_update {|c| c.permalink ||= c.stripped_name } |
26 | BareArticle.find_and_update {|a| a.permalink ||= a.stripped_title } |
27 | end |
28 | end |
29 | |
30 | |
31 | def self.down |
32 | STDERR.puts "Removing categories permalink" |
33 | remove_index :categories, :permalink |
34 | remove_column :categories, :permalink |
35 | end |
36 | end |