mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
11 lines
276 B
Ruby
11 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
|