Sha256: 2c1dad482fee342f39f5984fe6c9936cd1f4bfb63c7a2b0af580b15abac7383d

Contents?: true

Size: 246 Bytes

Versions: 4

Compression:

Stored size: 246 Bytes

Contents

class Tag
  include DataMapper::Resource

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

  has n, :taggings

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dm-tags-0.9.10 lib/dm-tags/tag.rb
dm-tags-0.9.11 lib/dm-tags/tag.rb
dm-tags-0.9.8 lib/dm-tags/tag.rb
dm-tags-0.9.9 lib/dm-tags/tag.rb