removecomments

This commit is contained in:
Andreas Stephanides
2014-10-04 12:09:56 +02:00
parent 1f2cc5d202
commit 116d0562d9
19 changed files with 5 additions and 296 deletions

View File

@@ -1,20 +0,0 @@
module IsCommentable
def self.included(base)
base.class_eval do
include InstanceMethods
has_many :comments, as: :commentable, dependent: :destroy
# extend ClassMethods
end
end
module InstanceMethods
def is_commentable?
true
end
def comment(user, text, attr={})
comments << Comment.build_for(self, user, text, attr)
end
end
end