init.rb 221 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 # monkey patch to add comments on action_tracker ActionTracker::Record.module_eval do has_many :comments, :class_name => 'Comment', :foreign_key => 'source_id', :dependent => :destroy, :order => 'created_at asc' end