activerecord 4.0.1.rc1 → 4.0.1.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activerecord might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d1fd9865b3fb6273381e9e80a0d91873fbf3416
4
- data.tar.gz: ca2daac77b93bd70b4bf2575a38fdec785e2cd08
3
+ metadata.gz: 6919ab97fb92f2377a746c834142424176551399
4
+ data.tar.gz: 121e17a8cc03ee15bbff871653a609b212666805
5
5
  SHA512:
6
- metadata.gz: 86a8645f43b690acd7a646fed38fe923bf12de401fc62bee0bf2ec17c80ad76d13ce88ec4f6ac07149febd08f2c9dedb25afb8b9057c94ae443566598c6c82e0
7
- data.tar.gz: c95f79b406c8d5453a19f7867283a1dab8799de4a3cb374f8cad1ba4a8bb3e29a21c52d4a9afbb6251f625e1f671d654c4d5808fef4086deb616358bdfb47216
6
+ metadata.gz: 60b11e93002526738fae389b4b7c441094f453fa03add683ff76b682bffc9e1193199958f2a9751fbe829a29118b8efa2bce1f217f65abdf2e45fae83cd8cbea
7
+ data.tar.gz: 79f53d379cfbaf7ecdc69d2b761208ce22e5ca905a0db60c113707ddd0048f1f28c9a48cd103dfab5f90e7819e9a69e84980736349a51909c4d5c470c4b630d7
@@ -143,7 +143,7 @@ module ActiveRecord
143
143
  private
144
144
 
145
145
  def has_default_function?(default_value, default)
146
- !default_value && (%r{\w+(.*)} === default)
146
+ !default_value && (%r{\w+\(.*\)} === default)
147
147
  end
148
148
 
149
149
  def extract_limit(sql_type)
@@ -889,6 +889,13 @@ module ActiveRecord
889
889
  def build_where(opts, other = [])
890
890
  case opts
891
891
  when String, Array
892
+ #TODO: Remove duplication with: /activerecord/lib/active_record/sanitization.rb:113
893
+ values = Hash === other.first ? other.first.values : other
894
+
895
+ values.grep(ActiveRecord::Relation) do |rel|
896
+ self.bind_values += rel.bind_values
897
+ end
898
+
892
899
  [@klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))]
893
900
  when Hash
894
901
  attributes = @klass.send(:expand_hash_conditions_for_aggregates, opts)
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  # Returns the version of the currently loaded ActiveRecord as a Gem::Version
3
3
  def self.version
4
- Gem::Version.new "4.0.1.rc1"
4
+ Gem::Version.new "4.0.1.rc2"
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1.rc1
4
+ version: 4.0.1.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-17 00:00:00.000000000 Z
11
+ date: 2013-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.1.rc1
19
+ version: 4.0.1.rc2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.1.rc1
26
+ version: 4.0.1.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.0.1.rc1
33
+ version: 4.0.1.rc2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.0.1.rc1
40
+ version: 4.0.1.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement