class ActsAsTaggableOn::Configuration

Attributes

default_parser[RW]
delimiter[RW]
force_lowercase[RW]
force_parameterize[RW]
remove_unused_tags[RW]
strict_case_match[RW]
tags_counter[RW]

Public Class Methods

apply_binary_collation(bincoll) click to toggle source
# File lib/acts-as-taggable-on.rb, line 103
def self.apply_binary_collation(bincoll)
  if Utils.using_mysql?
    coll = 'utf8_general_ci'
    if bincoll == true
      coll = 'utf8_bin'
    end
    ActiveRecord::Migration.execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE #{coll};")
  end
end
new() click to toggle source
# File lib/acts-as-taggable-on.rb, line 64
def initialize
  @delimiter = ','
  @force_lowercase = false
  @force_parameterize = false
  @strict_case_match = false
  @remove_unused_tags = false
  @tags_counter = true
  @default_parser = DefaultParser
  @force_binary_collation = false
end

Public Instance Methods

delimiter=(string) click to toggle source
# File lib/acts-as-taggable-on.rb, line 81
    def delimiter=(string)
      ActiveRecord::Base.logger.warn <<WARNING
ActsAsTaggableOn.delimiter is deprecated \
and will be removed from v4.0+, use  \
a ActsAsTaggableOn.default_parser instead
WARNING
      @delimiter = string
    end
force_binary_collation=(force_bin) click to toggle source
# File lib/acts-as-taggable-on.rb, line 90
def force_binary_collation=(force_bin)
  if Utils.using_mysql?
    if force_bin == true
      Configuration.apply_binary_collation(true)
      @force_binary_collation = true
      @strict_case_match = true
    else
      Configuration.apply_binary_collation(false)
      @force_binary_collation = false
    end
  end
end
strict_case_match=(force_cs) click to toggle source
# File lib/acts-as-taggable-on.rb, line 75
def strict_case_match=(force_cs)
  if @force_binary_collation == false
    @strict_case_match = force_cs
  end
end