2015-12-07 04:43:35 +08:00
|
|
|
class ArticleComment < ActiveRecord::Base
|
2015-12-20 05:54:47 +08:00
|
|
|
belongs_to :article, counter_cache: 'comments_count'
|
|
|
|
belongs_to :user
|
|
|
|
|
2016-01-06 20:47:26 +08:00
|
|
|
validates :content, length: {minimum: 10}
|
2015-12-07 04:43:35 +08:00
|
|
|
end
|