Sha256: 2233417f597446deca4702bb6ef0493a911aa79c85970e99d242a435419ce26a
Contents?: true
Size: 364 Bytes
Versions: 12
Compression:
Stored size: 364 Bytes
Contents
class Tagging < ActiveRecord::Base belongs_to :meta_tag belongs_to :taggable, :polymorphic => true def before_destroy # if all the taggings for a particular <%= parent_association_name -%> are deleted, we want to # delete the <%= parent_association_name -%> too meta_tag.destroy_without_callbacks if meta_tag.taggings.count < 2 end end
Version data entries
12 entries across 12 versions & 1 rubygems