negos_app/app/models/comment.rb
2016-02-16 21:09:48 +01:00

17 lines
310 B
Ruby
Executable File

# -*- 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