Sha256: dd23b6fa6a0f813296ede0792de0c87a1608f8e81ba9f2bd13807a2e4cc86a38

Contents?: true

Size: 237 Bytes

Versions: 2

Compression:

Stored size: 237 Bytes

Contents

class Tag
  include DataMapper::Resource
  property :id, Integer, :serial => true
  property :name, String, :nullable => false, :unique => true

  has n, :taggings
  
  def taggables
    taggings.map{|tagging| tagging.taggable}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dm-tags-0.0.2 lib/dm-tags/tag.rb
dm-tags-0.0.3 lib/dm-tags/tag.rb