Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moving requires

  • Loading branch information...
commit ec48b86e75352021680462545b4f7d5628887d45 1 parent 229e8f5
Aaron Lasseigne authored
View
6 lib/sqlite3_ar_regexp.rb
@@ -1,4 +1,6 @@
-require "sqlite3_ar_regexp/extension"
-require "sqlite3_ar_regexp/version"
+require 'active_record'
+require 'active_record/connection_adapters/sqlite3_adapter'
+require 'sqlite3_ar_regexp/extension'
+require 'sqlite3_ar_regexp/version'
ActiveRecord::ConnectionAdapters::SQLite3Adapter.send(:include, SQLite3ARRegexp::Extension)
View
2  lib/sqlite3_ar_regexp/extension.rb
@@ -1,7 +1,5 @@
# borrowed from http://titusd.co.uk/2010/01/31/regular-expressions-in-sqlite/
-require 'active_record/connection_adapters/sqlite3_adapter'
-
module SQLite3ARRegexp
module Extension
extend ActiveSupport::Concern
View
1  spec/regexp_spec.rb
@@ -1,4 +1,3 @@
-require 'active_record'
require 'sqlite3_ar_regexp'
describe 'SQLite3ARRegexp::Extension' do
Please sign in to comment.
Something went wrong with that request. Please try again.