Class: ActiveRecord::Extensions::MySQLRegexp
- Inherits:
-
RegexpBase
- Object
- RegexpBase
- ActiveRecord::Extensions::MySQLRegexp
- Defined in:
- lib/ar-extensions/extensions.rb
Overview
ActiveRecord::Extension for implementing Regexp implementation for MySQL. See documention for RegexpBase.
Constant Summary
Constants inherited from RegexpBase
RegexpBase::EQUAL_RGX, RegexpBase::NOT_EQUAL_RGX
Class Method Summary collapse
Methods inherited from RegexpBase
Class Method Details
.process(key, val, caller) ⇒ Object
392 393 394 395 396 |
# File 'lib/ar-extensions/extensions.rb', line 392 def self.process( key, val, caller ) return nil unless val.is_a?( Regexp ) r = field_result( key, caller ) Result.new( "#{caller.quoted_table_name}.#{r.fieldname} #{r.negate? ? 'NOT ':''} REGEXP ?", val ) end |