move monkey patches to a separate file
This commit is contained in:
parent
dc71bbbd98
commit
72b67b0103
|
@ -62,14 +62,4 @@ end
|
||||||
|
|
||||||
Rails.application.routes.default_url_options[:host] = "lobste.rs"
|
Rails.application.routes.default_url_options[:host] = "lobste.rs"
|
||||||
|
|
||||||
module ActiveRecord
|
require "#{Rails.root}/lib/monkey"
|
||||||
class Base
|
|
||||||
def self.q(str)
|
|
||||||
ActiveRecord::Base.connection.quote(str)
|
|
||||||
end
|
|
||||||
|
|
||||||
def q(str)
|
|
||||||
ActiveRecord::Base.connection.quote(str)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
11
lib/monkey.rb
Normal file
11
lib/monkey.rb
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
module ActiveRecord
|
||||||
|
class Base
|
||||||
|
def self.q(str)
|
||||||
|
ActiveRecord::Base.connection.quote(str)
|
||||||
|
end
|
||||||
|
|
||||||
|
def q(str)
|
||||||
|
ActiveRecord::Base.connection.quote(str)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue