Sha256: e2cd6ce5d66bc1f5c5beaa534139b868ddb4389f8159109c977481d5cda73d0c

Contents?: true

Size: 421 Bytes

Versions: 1

Compression:

Stored size: 421 Bytes

Contents

class Tagging
  include DataMapper::Resource
  property :id, Integer, :serial => true
  property :tag_id, Integer, :nullable => false
  property :taggable_id, Integer, :nullable => false
  property :taggable_type, String, :nullable => false
  property :tag_context, String, :nullable => false

  belongs_to :tag

  def taggable
    eval("#{taggable_type}.get!(#{taggable_id})") if taggable_type and taggable_id
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dm-tags-0.9.7 lib/dm-tags/tagging.rb