Sha256: 4166f130daf71340d0489d92a6bb9c34ccf80f0c8ff36602cc767a77dfe9ae1b
Contents?: true
Size: 496 Bytes
Versions: 9
Compression:
Stored size: 496 Bytes
Contents
class Comment < ActiveRecord::Base include ActsAsCommentable::Comment include Rostra::EmailNotifier include Rostra::TimestampObserver belongs_to :commentable, polymorphic: true belongs_to :user validates :comment, presence: true, uniqueness: true validates_presence_of :user_id, :commentable_type, :commentable_id default_scope order: 'created_at ASC' def question commentable.question if commentable.is_a?(Rostra::Answer) end alias_attribute :text, :comment end
Version data entries
9 entries across 9 versions & 1 rubygems