Displaying 1 result from an estimated 1 matches for "tagactivity".
Did you mean:
mfgactivity
2006 Mar 19
1
some strange behavior for has_many with STI
...are the model associations for Events,
Activities and Comments:
class Activity < ActiveRecord::Base
belongs_to :user
has_many :comments, :conditions => "type = ''Activity''", :foreign_key
=> "type_id"
acts_as_taggable :join_class_name => "TagActivity"
class Event < ActiveRecord::Base
include EventMatching
belongs_to :activity_type
has_and_belongs_to_many :users
has_many :comments, :conditions => "type = ''Event''", :foreign_key => "type_id"
class Comment < ActiveRecord::Base
belon...