Sha256: ae3971876278d7d9db3d3f63e30bdb3659f57922de21732b3052be78202e91e0

Contents?: true

Size: 1.06 KB

Versions: 10

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

require "active_record/version"

module Gutentag
  def self.dirtier
    @dirtier
  end

  def self.dirtier=(dirtier)
    @dirtier = dirtier
  end

  def self.normaliser
    @normaliser ||= lambda { |tag_name| tag_name.to_s.downcase }
  end

  def self.normaliser=(normaliser)
    @normaliser = normaliser
  end

  def self.tag_validations
    @tag_validations ||= Gutentag::TagValidations
  end

  def self.tag_validations=(tag_validations)
    @tag_validations = tag_validations
  end
end

require "gutentag/active_record"
require "gutentag/change_state"
require "gutentag/dirty"
require "gutentag/persistence"
require "gutentag/remove_unused"
require "gutentag/tag_names"
require "gutentag/tagged_with"

Gutentag.dirtier = Gutentag::Dirty if ActiveRecord::VERSION::STRING.to_f < 4.2

if defined?(Rails::Engine)
  require "gutentag/engine"
else
  require "active_record"

  Gutentag.autoload :Tag,
    File.expand_path("../app/models/gutentag/tag", __dir__)
  Gutentag.autoload :Tagging,
    File.expand_path("../app/models/gutentag/tagging", __dir__)
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gutentag-2.6.2 lib/gutentag.rb
gutentag-2.6.1 lib/gutentag.rb
gutentag-2.6.0 lib/gutentag.rb
gutentag-2.5.4 lib/gutentag.rb
gutentag-2.5.3 lib/gutentag.rb
gutentag-2.5.2 lib/gutentag.rb
gutentag-2.5.1 lib/gutentag.rb
gutentag-2.5.0 lib/gutentag.rb
gutentag-2.4.1 lib/gutentag.rb
gutentag-2.4.0 lib/gutentag.rb