Sha256: 99a809e9b897d44cf2accba0aedb1da670e763e25766af4b3b27ee2d13f9a621
Contents?: true
Size: 407 Bytes
Versions: 14
Compression:
Stored size: 407 Bytes
Contents
module Tagalong class TagalongTag < ::ActiveRecord::Base has_many :tagalong_taggings, :dependent => :destroy, :class_name => 'Tagalong::TagalongTagging' belongs_to :tagger, :polymorphic => true validates_presence_of :name validates_uniqueness_of :name, :scope => [ :tagger_id, :tagger_type ] def taggables tagalong_taggings.map { |tagging| tagging.taggable } end end end
Version data entries
14 entries across 14 versions & 1 rubygems