From e8d298c223a6c5f155c5765fea4b99e7e2de3097 Mon Sep 17 00:00:00 2001 From: Ryan Bates Date: Thu, 30 Dec 2010 14:44:31 -0800 Subject: [PATCH] removing fake sanitize methods in specs because we're using Active Record now --- spec/spec_helper.rb | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index afea17f..2971859 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -30,28 +30,4 @@ end class Project < SuperModel::Base belongs_to :category - - class << self - protected - - def sanitize_sql(hash_cond) - case hash_cond - when Hash - sanitize_hash(hash_cond).join(' AND ') - when Array - hash_cond.shift.gsub('?'){"#{hash_cond.shift.inspect}"} - when String then hash_cond - end - end - - def sanitize_hash(hash) - hash.map do |name, value| - if Hash === value - sanitize_hash(value).map{|cond| "#{name}.#{cond}"} - else - "#{name}=#{value}" - end - end.flatten - end - end end