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:
- 516 Bytes
1 | class FixLastPosts < ActiveRecord::Migration |
2 | class Topic < ActiveRecord::Base |
3 | has_many :posts, :order => 'posts.created_at' |
4 | end |
5 | class Post < ActiveRecord::Base; end |
6 | |
7 | def self.up |
8 | Topic.find(:all, :include => :posts).each do |topic| |
9 | post = topic.posts.last |
10 | Topic.transaction do |
11 | Topic.update_all(['replied_at = ?, replied_by = ?, last_post_id = ?', |
12 | post.created_at, post.user_id, post.id], ['id = ?', topic.id]) if post |
13 | end |
14 | end |
15 | end |
16 | |
17 | def self.down |
18 | end |
19 | end |