Sha256: 986f295bae41bedcbc6b735f8b481f60174b66f38cf2987133764b8b804ac839

Contents?: true

Size: 697 Bytes

Versions: 10

Compression:

Stored size: 697 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Models
    #
    # Tag model
    #
    class Tag < ActiveRecord::Base
      # @!attribute [rw] name
      #   @return [String]

      has_many :taggings, dependent: :destroy

      include SearchCop
      include Concerns::Searchable

      search_scope :search do
        attributes :id, :name
      end

      class << self
        # @!method search_by_filter(filter)
        #   @param [Mihari::Structs::Filters::Search] filter
        #   @return [Array<Mihari::Models::Tag>]

        # @!method count_by_filter(filter)
        #   @param [Mihari::Structs::Filters::Search] filter
        #   @return [Integer]
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mihari-8.0.2 lib/mihari/models/tag.rb
mihari-8.0.1 lib/mihari/models/tag.rb
mihari-8.0.0 lib/mihari/models/tag.rb
mihari-7.6.4 lib/mihari/models/tag.rb
mihari-7.6.3 lib/mihari/models/tag.rb
mihari-7.6.2 lib/mihari/models/tag.rb
mihari-7.6.1 lib/mihari/models/tag.rb
mihari-7.6.0 lib/mihari/models/tag.rb
mihari-7.5.0 lib/mihari/models/tag.rb
mihari-7.4.0 lib/mihari/models/tag.rb