Sha256: 606e1c01f75022659cc8820a61ada1de5e3b062095d5e0b95c88bef9855e95dc
Contents?: true
Size: 301 Bytes
Versions: 6
Compression:
Stored size: 301 Bytes
Contents
class Tagging < ActiveRecord::Base #:nodoc: belongs_to :tag belongs_to :taggable, :polymorphic => true after_destroy :destroy_tag_if_unused private def destroy_tag_if_unused if Tag.destroy_unused if tag.taggings.count.zero? tag.destroy end end end end
Version data entries
6 entries across 6 versions & 3 rubygems