Module: ActiveRecord::ConnectionAdapters::MysqlCommon

Included in:
Mysql2Adapter, MysqlAdapter
Defined in:
lib/card/active_record_ext.rb

Instance Method Summary collapse

Instance Method Details

#custom_cast_typesObject



29
30
31
32
33
34
35
# File 'lib/card/active_record_ext.rb', line 29

def custom_cast_types
  { string:  { name: 'char'    },
    integer: { name: 'signed'  },
    text:    { name: 'char'    },
    float:   { name: 'decimal' },
    binary:  { name: 'binary'  }  }
end

#match(string) ⇒ Object



25
26
27
# File 'lib/card/active_record_ext.rb', line 25

def match string
  "REGEXP #{string}"
end