From eea6e7c4f0b1ad370e42c9762b65edf92bc1f891 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Fri, 23 Dec 2011 01:14:14 -0200 Subject: [PATCH] Added comments on action_tracker --- vendor/plugins/action_tracker_has_comments/init.rb | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) create mode 100644 vendor/plugins/action_tracker_has_comments/init.rb diff --git a/vendor/plugins/action_tracker_has_comments/init.rb b/vendor/plugins/action_tracker_has_comments/init.rb new file mode 100644 index 0000000..c716e69 --- /dev/null +++ b/vendor/plugins/action_tracker_has_comments/init.rb @@ -0,0 +1,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 -- libgit2 0.21.2