class Object

Public Class Methods

extract_value_from_default_with_citext_support(default) click to toggle source
# File lib/activerecord/postgresql/citext.rb, line 24
def self.extract_value_from_default_with_citext_support(default)
  if default =~ /\A'(.*)'::(?:citext)\z/m
    $1
  else
    extract_value_from_default_without_citext_support(default)
  end
end

Public Instance Methods

citext(*args) click to toggle source
# File lib/activerecord/postgresql/citext.rb, line 6
def citext(*args)
  options = args.extract_options!
  column(args[0], 'citext', options)
end
native_database_types_with_citext() click to toggle source
# File lib/activerecord/postgresql/citext.rb, line 37
def native_database_types_with_citext
  native_database_types_without_citext.merge(
    :citext => { :name => "citext" }
  )
end
simplified_type_with_citext_support(field_type) click to toggle source
# File lib/activerecord/postgresql/citext.rb, line 13
def simplified_type_with_citext_support(field_type)
  if field_type == "citext"
    :citext
  else
    simplified_type_without_citext_support(field_type)
  end
end