meta_where 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ Changes since 0.9.5 (2010-09-27):
2
+ * Don't skip adding condition if an empty array is supplied
3
+
1
4
  Changes since 0.9.4 (2010-09-23):
2
5
  * Fix those fun problems with cache_classes.
3
6
 
data/Gemfile CHANGED
@@ -1,8 +1,3 @@
1
1
  source :rubygems
2
- gem "arel", "~> 1.0.1"
3
- gem "activerecord", "~> 3.0.0"
4
- gem "activesupport", "~> 3.0.0"
5
- group :test do
6
- gem "rake"
7
- gem "shoulda"
8
- end
2
+
3
+ gemspec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5
1
+ 0.9.6
@@ -30,7 +30,7 @@ module MetaWhere
30
30
  elsif value.is_a?(MetaWhere::Condition)
31
31
  association = parent.is_a?(Symbol) ? nil : @join_dependency.find_join_association(column, parent)
32
32
  value.to_predicate(self, association || column)
33
- elsif value.is_a?(Array) && value.all? {|v| v.respond_to?(:to_predicate)}
33
+ elsif value.is_a?(Array) && !value.empty? && value.all? {|v| v.respond_to?(:to_predicate)}
34
34
  association = parent.is_a?(Symbol) ? nil : @join_dependency.find_join_association(column, parent)
35
35
  value.map {|val| val.to_predicate(self, association || column)}
36
36
  else
@@ -81,4 +81,4 @@ module MetaWhere
81
81
  end
82
82
 
83
83
  end
84
- end
84
+ end
data/meta_where.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{meta_where}
8
- s.version = "0.9.5"
8
+ s.version = "0.9.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ernie Miller"]
12
- s.date = %q{2010-09-27}
12
+ s.date = %q{2010-09-30}
13
13
  s.description = %q{
14
14
  MetaWhere offers the ability to call any Arel predicate methods
15
15
  (with a few convenient aliases) on your Model's attributes instead
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 5
9
- version: 0.9.5
8
+ - 6
9
+ version: 0.9.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ernie Miller
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-27 00:00:00 -04:00
17
+ date: 2010-09-30 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency