Sha256: 3aae23bab60739d745dbf0ad7e391e2aef5f669cbd63fef44c1d7f6652067ad8

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

module CommentableOn
  class Comment < ::ActiveRecord::Base
    if defined?(ProtectedAttributes)
      attr_accessible :commentable_id, :commentable_type, :commenter_id, :commenter_type, :commentable, :commenter, :body
    end

    belongs_to :commentable, polymorphic: true
    belongs_to :commenter, polymorphic: true

    validates_presence_of :commentable_id
    validates_presence_of :commenter_id
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
commentable_on-0.1.0 lib/commentable_on/comment.rb