Sha256: f48eb79aeaab909334855c1a64f956a2688870431ab9b81bd31ce3b2000a4a33

Contents?: true

Size: 927 Bytes

Versions: 1

Compression:

Stored size: 927 Bytes

Contents

require 'active_record/version'

module Gutentag
  def self.dirtier
    @dirtier
  end

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

  def self.normaliser
    @normaliser ||= Gutentag::TagName
  end

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

require 'gutentag/active_record'
require 'gutentag/dirty'
require 'gutentag/persistence'
require 'gutentag/tag_name'

if ActiveRecord::VERSION::MAJOR == 3
  Gutentag.dirtier = Gutentag::Dirty
elsif ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR < 2
  Gutentag.dirtier = Gutentag::Dirty
end

if defined?(Rails::Engine)
  require 'gutentag/engine'
else
  require 'active_record'
  ActiveRecord::Base.include Gutentag::ActiveRecord
  require File.expand_path(
    './../app/models/gutentag/tag', File.dirname(__FILE__)
  )
  require File.expand_path(
    './../app/models/gutentag/tagging', File.dirname(__FILE__)
  )
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gutentag-0.7.0 lib/gutentag.rb