Sha256: 2d3985d0bd7db30448fb4ce874c4673e5e3725a838f8006eb1fe4708d56182f1

Contents?: true

Size: 223 Bytes

Versions: 11

Compression:

Stored size: 223 Bytes

Contents

class Tag
  include DataMapper::Resource

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

  has n, :taggings

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dm-tags-1.2.0 lib/dm-tags/tag.rb
dm-tags-1.2.0.rc2 lib/dm-tags/tag.rb
dm-tags-1.2.0.rc1 lib/dm-tags/tag.rb
dm-tags-1.1.0 lib/dm-tags/tag.rb
dm-tags-1.1.0.rc3 lib/dm-tags/tag.rb
dm-tags-1.1.0.rc2 lib/dm-tags/tag.rb
dm-tags-1.1.0.rc1 lib/dm-tags/tag.rb
dm-tags-1.0.2 lib/dm-tags/tag.rb
dm-tags-1.0.1 lib/dm-tags/tag.rb
dm-tags-1.0.0 lib/dm-tags/tag.rb
dm-tags-1.0.0.rc3 lib/dm-tags/tag.rb