activerecord 4.2.9 → 4.2.10.rc1

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: 4500037107cdc98ddc3db0bac7771c650acf7f68
4
- data.tar.gz: 3eb29ccdb7b58d87fa7a1fa5ebe12ab3fcb2537a
3
+ metadata.gz: ce3bb552111036480d10adace4def3eeca1935ab
4
+ data.tar.gz: 157e74c06567e32410d53958fa6077916eb902fe
5
5
  SHA512:
6
- metadata.gz: 6be857910cc7b548e0b71aaf6c9c21d455f78b8d29ec7f1067408989805c94312735ad6c4065d674afec5a38ebbad617ba5f4a39866099db4de35ff764cbc263
7
- data.tar.gz: 54dcd7d248f6d6564bc208250227dd2cedaea847382e56c5c6473ec20d28169575afa974026c45c8ff93a76fd19e83b1ce72e393d30b91b76092e87f147b52a4
6
+ metadata.gz: dde61f494e7197966258b749cdc8036116da0ac2f14c31b11d15731d6b053ac15250cb39a7e97b662098c78aecfa8c8ace22add25ed9f827cd75ab053d632d39
7
+ data.tar.gz: 224b521f4fa07428ea3557c5589a62b5f164927180a00aa6b73f7dd1bf6025bef7cb25b543f4903ba77bfe54ec578d06a88c77afadbbb7cb2956ae1dc35d3613
@@ -1,3 +1,12 @@
1
+ ## Rails 4.2.10.rc1 (September 20, 2017) ##
2
+
3
+ * `Relation#joins` is no longer affected by the target model's
4
+ `current_scope`, with the exception of `unscoped`.
5
+
6
+ Fixes #29338.
7
+
8
+ *Sean Griffin*
9
+
1
10
  ## Rails 4.2.9 (June 26, 2017) ##
2
11
 
3
12
  * Fix regression caused by `collection_singular_ids=` ignoring different primary key on relationship.
@@ -53,10 +53,8 @@ module ActiveRecord
53
53
  scope_chain_index += 1
54
54
 
55
55
  klass_scope =
56
- if klass.current_scope
57
- klass.current_scope.clone.tap { |scope|
58
- scope.joins_values = []
59
- }
56
+ if klass.current_scope && klass.current_scope.values.blank?
57
+ klass.unscoped
60
58
  else
61
59
  klass.send(:build_default_scope, ActiveRecord::Relation.create(klass, table))
62
60
  end
@@ -282,6 +282,14 @@ module ActiveRecord
282
282
  0
283
283
  end
284
284
 
285
+ def quoted_date(value)
286
+ if supports_datetime_with_precision? && value.acts_like?(:time) && value.respond_to?(:usec)
287
+ "#{super}.#{sprintf("%06d", value.usec)}"
288
+ else
289
+ super
290
+ end
291
+ end
292
+
285
293
  # REFERENTIAL INTEGRITY ====================================
286
294
 
287
295
  def disable_referential_integrity #:nodoc:
@@ -74,14 +74,6 @@ module ActiveRecord
74
74
  @connection.escape(string)
75
75
  end
76
76
 
77
- def quoted_date(value)
78
- if supports_datetime_with_precision? && value.acts_like?(:time) && value.respond_to?(:usec)
79
- "#{super}.#{sprintf("%06d", value.usec)}"
80
- else
81
- super
82
- end
83
- end
84
-
85
77
  #--
86
78
  # CONNECTION MANAGEMENT ====================================
87
79
  #++
@@ -282,6 +282,10 @@ module ActiveRecord
282
282
  super
283
283
  end
284
284
  end
285
+
286
+ def has_precision?
287
+ precision || 0
288
+ end
285
289
  end
286
290
 
287
291
  class Time < Type::Time # :nodoc:
@@ -328,8 +332,11 @@ module ActiveRecord
328
332
 
329
333
  def initialize_type_map(m) # :nodoc:
330
334
  super
331
- m.register_type %r(datetime)i, Fields::DateTime.new
332
335
  m.register_type %r(time)i, Fields::Time.new
336
+ m.register_type(%r(datetime)i) do |sql_type|
337
+ precision = extract_precision(sql_type)
338
+ Fields::DateTime.new(precision: precision)
339
+ end
333
340
  end
334
341
 
335
342
  def exec_without_stmt(sql, name = 'SQL') # :nodoc:
@@ -7,8 +7,8 @@ module ActiveRecord
7
7
  module VERSION
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
- TINY = 9
11
- PRE = nil
10
+ TINY = 10
11
+ PRE = "rc1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
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.2.9
4
+ version: 4.2.10.rc1
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: 2017-06-26 00:00:00.000000000 Z
11
+ date: 2017-09-20 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.2.9
19
+ version: 4.2.10.rc1
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.2.9
26
+ version: 4.2.10.rc1
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.2.9
33
+ version: 4.2.10.rc1
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.2.9
40
+ version: 4.2.10.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -299,12 +299,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
299
  version: 1.9.3
300
300
  required_rubygems_version: !ruby/object:Gem::Requirement
301
301
  requirements:
302
- - - ">="
302
+ - - ">"
303
303
  - !ruby/object:Gem::Version
304
- version: '0'
304
+ version: 1.3.1
305
305
  requirements: []
306
306
  rubyforge_project:
307
- rubygems_version: 2.6.12
307
+ rubygems_version: 2.5.2
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: Object-relational mapper framework (part of Rails).