Sha256: 4571d49eb4e52bda5140d8a66de8868e1781d1d3c9b01a0bbbfcc90c4d2f8f51

Contents?: true

Size: 378 Bytes

Versions: 4

Compression:

Stored size: 378 Bytes

Contents

class Spraypaint::Model::Tagging < ActiveRecord::Base
  set_table_name :spraypaint_taggings
  
  # Main association between an individual tagging and the actual tag
  belongs_to :tag, :class_name => 'Spraypaint::Model::Tag'
  
  # Association between the tagging and the object being tagged
  belongs_to :target, :polymorphic => true
  
  validates_presence_of :tag, :target
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spraypaint-1.0.3 lib/spraypaint/model/tagging.rb
spraypaint-1.0.2 lib/spraypaint/model/tagging.rb
spraypaint-1.0.1 lib/spraypaint/model/tagging.rb
spraypaint-1.0.0 lib/spraypaint/model/tagging.rb