Sha256: 638972e005c27ca80ca018898acc961492d1abcb3f1595319bcd299da3805d91
Contents?: true
Size: 590 Bytes
Versions: 1
Compression:
Stored size: 590 Bytes
Contents
module TentD module Model class Mention include DataMapper::Resource storage_names[:default] = "mentions" property :id, Serial property :entity, Text, :lazy => false, :required => true property :mentioned_post_id, String belongs_to :post, 'TentD::Model::Post', :required => false belongs_to :post_version, 'TentD::Model::PostVersion', :required => false validates_presence_of :post_id, :if => lambda { |m| m.post_version_id.nil? } validates_presence_of :post_version_id, :if => lambda { |m| m.post_id.nil? } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tentd-0.0.1 | lib/tentd/model/mention.rb |