Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 173
- Log:
Updated to latest release of Beast according to the "getting started with
Beast" guide at:http://beast.caboo.se/forums/1/topics/381
This check-in includes frozen Edge Rails and has the beginnings of
configuration for the ROOL site included.
- Author:
- rool
- Date:
- Fri Mar 02 15:59:12 +0000 2007
- Size:
- 1057 Bytes
1 | class AddPostsBodyHtml < ActiveRecord::Migration |
2 | def self.up |
3 | add_column "posts", "body_html", :text |
4 | add_column "users", "bio_html", :text |
5 | add_column "forums", "description_html", :text |
6 | [Post, Forum, User].each do |klass| |
7 | klass.transaction do |
8 | klass.find(:all).each do |record| |
9 | begin |
10 | record.save_without_validation! |
11 | rescue |
12 | puts message_for_record(record, "[#{$!.class.name}] #{$!.message}") |
13 | end |
14 | end |
15 | end |
16 | end |
17 | end |
18 | |
19 | def self.down |
20 | remove_column "posts", "body_html" |
21 | remove_column "users", "bio_html" |
22 | remove_column "forums", "description_html" |
23 | end |
24 | |
25 | private |
26 | def self.message_for_record(record, message) |
27 | case record |
28 | when Post |
29 | "Post ##{record.id} of /forums/#{record.forum_id}/topics/#{record.topic_id}" |
30 | when User |
31 | "User #{record.display_name} /users/##{record.id}" |
32 | when Forum |
33 | "Forum /forums/##{record.id}" |
34 | end << " errored with: '#{message}'" |
35 | end |
36 | end |