Sha256: 5ddea0d48ba587c1a3cb597179881a641cc185034421e52c2962ba9d8e31695c
Contents?: true
Size: 413 Bytes
Versions: 21
Compression:
Stored size: 413 Bytes
Contents
module Model module MongoDb module Commentable def comments mongo_db_document = MongoDbDocument.where( mongo_db_object_id: self.id.to_s, klass_name: self.class.name ).first if mongo_db_document Comment.where(commentable_type: 'MongoDbDocument', commentable_id: mongo_db_document.id) else [] end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems