beagle_app/app/models/comment.rb
Nicolas Bally 7b6cba2128 initial
2015-01-27 23:13:36 +01:00

17 lines
305 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