Sha256: ae475a8463e5d518a6ce53d1ed91bc642ce308121b8523048a400a9b536032ba

Contents?: true

Size: 246 Bytes

Versions: 3

Compression:

Stored size: 246 Bytes

Contents

class Tag
  include DataMapper::Resource

  property :id,   Serial
  property :name, String, :required => true, :unique => true, :unique_index => true

  has n, :taggings

  def taggables
    taggings.map { |tagging| tagging.taggable }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dm-tags-1.0.0.rc2 lib/dm-tags/tag.rb
dm-tags-1.0.0.rc1 lib/dm-tags/tag.rb
dm-tags-0.10.2 lib/dm-tags/tag.rb