Repository URL to install this package:
|
Version:
0.3.0 ▾
|
# frozen_string_literal: true
module Topical
class Tagging < ::ActiveRecord::Base
taggable_options = { polymorphic: true }
if Rails::VERSION::MAJOR >= 5
taggable_options[:optional] = true
end
belongs_to :taggable, taggable_options
belongs_to :tag
default_scope -> { order :position }
end
end