From d536eaa3b33f231627cc85ba8c7148d630c4ce8f Mon Sep 17 00:00:00 2001 From: joshua stein Date: Sat, 30 Jun 2012 20:02:45 -0500 Subject: [PATCH] move monkey patch to config --- config/application.rb | 12 ++++++++++++ extras/utils.rb | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/config/application.rb b/config/application.rb index 9856295..87b9f12 100644 --- a/config/application.rb +++ b/config/application.rb @@ -59,3 +59,15 @@ module Lobsters end Rails.application.routes.default_url_options[:host] = "lobste.rs" + +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 diff --git a/extras/utils.rb b/extras/utils.rb index e6fa134..feb7fb4 100644 --- a/extras/utils.rb +++ b/extras/utils.rb @@ -14,13 +14,3 @@ class Utils return str end end - -class ActiveRecord::Base - def self.q(str) - ActiveRecord::Base.connection.quote(str) - end - - def q(str) - ActiveRecord::Base.connection.quote(str) - end -end