pic_vert_app/app/models/comment.rb
Nicolas Bally 6291ba461b suite
2021-05-15 09:46:31 +02:00

17 lines
310 B
Ruby

# -*- encoding : utf-8 -*-
class Comment < ActiveRecord::Base
include ActsAsCommentable::Comment
belongs_to :commentable, :polymorphic => true
validates :pseudo, :presence => true
validates :comment, :presence => true
scope :recents, -> {where("enabled = ?",true ).order("created_at ASC")}
end