Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 171
- Log:
Initial import of Beast 0.9 from downloaded Tarball. Beast is a Ruby
On Rails based forum application. The original tarball came from the
following location:http://s3.amazonaws.com/beast-forum/beast-0.9.tar.gz
The forum post which announced this version's availability was at:
http://beast.caboo.se/forums/1/topics/446
- Author:
- rool
- Date:
- Fri Mar 02 15:51:55 +0000 2007
- Size:
- 1002 Bytes
1 | class Topic < ActiveRecord::Base |
2 | belongs_to :forum, :counter_cache => true |
3 | belongs_to :user |
4 | has_many :monitorships |
5 | has_many :monitors, :through => :monitorships, :conditions => ['monitorships.active = ?', true], :source => :user, :order => 'users.login' |
6 | |
7 | has_many :posts, :order => 'posts.created_at', :dependent => :destroy |
8 | belongs_to :replied_by_user, :foreign_key => "replied_by", :class_name => "User" |
9 | |
10 | validates_presence_of :forum, :user, :title |
11 | before_create { |r| r.replied_at = Time.now.utc } |
12 | attr_accessible :title |
13 | # to help with the create form |
14 | attr_accessor :body |
15 | |
16 | def voices |
17 | posts.map { |p| p.user_id }.uniq.size |
18 | end |
19 | |
20 | def hit! |
21 | self.class.increment_counter :hits, id |
22 | end |
23 | |
24 | def sticky?() sticky == 1 end |
25 | |
26 | def views() hits end |
27 | |
28 | def paged?() posts_count > 25 end |
29 | |
30 | def last_page |
31 | (posts_count.to_f / 25.0).ceil.to_i |
32 | end |
33 | |
34 | def editable_by?(user) |
35 | user && (user.id == user_id || user.admin? || user.moderator_of?(forum_id)) |
36 | end |
37 | |
38 | end |