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
Class Method Summary collapse
Methods inherited from RegexpBase
Class Method Details
.process(key, val, caller) ⇒ Object
387 388 389 390 391 |
# File 'lib/ar-extensions/extensions.rb', line 387 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 |