Permalink
Browse files

allow for False class as filter value

  • Loading branch information...
acatighera committed Sep 10, 2010
1 parent 8bd22c5 commit a7c0adfe282d470b1dd68cfea2019f3008ee60f2
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/statistics.rb
  2. +1 −1 statistics.gemspec
View
@@ -64,7 +64,7 @@ def define_statistic(name, options)
scoped_options = Marshal.load(Marshal.dump(options))
filters.each do |key, value|
- if value
+ unless value.nil?
sql = ((@filter_all_on || {}).merge(scoped_options[:filter_on] || {}))[key].gsub("?", "'#{value}'")
sql = sql.gsub("%t", "#{table_name}")
sql_frag = send(:sanitize_sql_for_conditions, sql)
View
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Alexandru Catighera"]
- s.date = %q{2010-01-15}
+ s.date = %q{2010-02-18}
s.email = %q{acatighera@gmail.com}
s.extra_rdoc_files = [
"README.markdown"

0 comments on commit a7c0adf

Please sign in to comment.