spec/shared/app_root/app/models/topic.rb in edge_rider-0.2.5 vs spec/shared/app_root/app/models/topic.rb in edge_rider-0.3.0
- old
+ new
@@ -1,9 +1,11 @@
class Topic < ActiveRecord::Base
include AllowSettingIdOnCreate
belongs_to :forum
- belongs_to :active_forum, :conditions => { :trashed => false }, :class_name => 'Forum'
+ EdgeRider::Util.define_association self, :belongs_to, :active_forum,
+ :conditions => { :trashed => false }, :class_name => 'Forum'
+
has_many :posts
belongs_to :author, :class_name => 'User'
has_many :post_authors, :through => :posts
has_defaults :trashed => false