mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
12 lines
276 B
Ruby
12 lines
276 B
Ruby
|
|
class Tagging < ActiveRecord::Base
|
||
|
|
belongs_to :tag
|
||
|
|
belongs_to :taggable, :polymorphic => true
|
||
|
|
belongs_to :user
|
||
|
|
|
||
|
|
# def before_destroy
|
||
|
|
# # disallow orphaned tags
|
||
|
|
# # TODO: this doesn't seem to be working
|
||
|
|
# tag.destroy if tag.taggings.count < 2
|
||
|
|
# end
|
||
|
|
end
|