From 5dd744c1bb83f141d7cc60c5efdaef7c52f22995 Mon Sep 17 00:00:00 2001 From: "Clinton R. Nixon" Date: Thu, 13 Mar 2008 17:36:02 -0400 Subject: [PATCH] Fixed :conditions in tag_counts to accept array to sanitize --- CHANGELOG | 1 + lib/acts_as_taggable.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index ee72f60..f314bd9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ [13 March 08] * Added helper methods for will_paginate compatibility (Clinton R. Nixon) +* Fixed :conditions in tag_counts to accept array to sanitize (Clinton R. Nixon) [07 March 08] diff --git a/lib/acts_as_taggable.rb b/lib/acts_as_taggable.rb index 6c34774..d537889 100644 --- a/lib/acts_as_taggable.rb +++ b/lib/acts_as_taggable.rb @@ -116,7 +116,7 @@ def find_options_for_tag_counts(options = {}) conditions = [ "#{Tagging.table_name}.taggable_type = #{quote_value(base_class.name)}", - options.delete(:conditions), + sanitize_sql(options.delete(:conditions)), scope && scope[:conditions], start_at, end_at