Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ce64102b68
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.648 kb
module TentD
module Model
class Mention
include DataMapper::Resource
storage_names[:default] = "mentions"
property :id, Serial
property :entity, Text, :lazy => false, :required => true
property :original_post, Boolean, :default => false
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
Jump to Line
Something went wrong with that request. Please try again.