adds voting methods to comment model [#25]

This commit is contained in:
rgarcia
2015-08-02 13:35:48 +02:00
parent 2ea638967b
commit 7a50d2064c

View File

@@ -1,5 +1,6 @@
class Comment < ActiveRecord::Base
acts_as_nested_set scope: [:commentable_id, :commentable_type]
acts_as_votable
validates :body, presence: true
validates :user, presence: true