Sha256: 4d06b0317dab38f5e05a9639fd4286d937b4d1a84daa8bbc0a5aa8b0d472af59

Contents?: true

Size: 334 Bytes

Versions: 13

Compression:

Stored size: 334 Bytes

Contents

class Tagging
  include DataMapper::Resource

  property :id,            Serial
  property :taggable_id,   Integer, :required => true, :min => 1
  property :taggable_type, Class,   :required => true
  property :tag_context,   String,  :required => true

  belongs_to :tag

  def taggable
    taggable_type.get!(taggable_id)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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