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



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

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

#match(string) ⇒ Object



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

def match(string)
  "REGEXP #{string}"
end