activerecord 4.0.6.rc1 → 4.0.6.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: a0eee7da9c94ef26da56fe60b92893386de6d2b1
4
- data.tar.gz: 9008c81b96ed86e1c650bbed89290d6c0e1b4802
3
+ metadata.gz: 3b0fa86f5043698ec7f2c9626e219c08fe74d522
4
+ data.tar.gz: aaead311e97dcbc16d582002aca7283704252518
5
5
  SHA512:
6
- metadata.gz: c697cbcabccdf2e4494c67fc3c86f099686f8316a65d74a5986dbe6a022ec6eb3106b796d7e82722a43f86a4c91afca40e0f47b9e37a03dd4e6427bec0354d4c
7
- data.tar.gz: 80fefaf272a8bf843e275c25abcdf528a6a6a2518fba10794f842a79bb2a8b675dd62546e736c90fc235ad71df3e00782330b8ca52d2752396010de2d1400cf5
6
+ metadata.gz: 21900f60abb889b7ecc3b567b267577338b4274c56a7ad2c326ed3bd24927e55af2d3f8fdf52e96c63a59b93fd49eac57c6b93732ce12095d0e9068fa8b22744
7
+ data.tar.gz: f534c623dbd30b572da79041cd2072257587cf770926d5124f7b1cf09af0a71561e93227758fbe99fc5622e7bab51e2fef7cede7836454eab63db4a2b5adc868
@@ -1,4 +1,4 @@
1
- ## Rails 4.0.6 (May 27, 2014) ##
1
+ ## Rails 4.0.6 (June 16, 2014) ##
2
2
 
3
3
  * Fixed the inferred table name of a has_and_belongs_to_many auxiliar
4
4
  table inside a schema.
@@ -165,10 +165,6 @@
165
165
 
166
166
  *Luke Steensen*
167
167
 
168
- * Make possible to change `record_timestamps` inside Callbacks.
169
-
170
- *Tieg Zaharia*
171
-
172
168
  * Fixed error where `#persisted?` throws `SystemStackError` for an unsaved model with a
173
169
  custom primary key that didn't save due to validation error.
174
170
 
@@ -84,14 +84,18 @@ module ActiveRecord
84
84
  @through_records[record.object_id] ||= begin
85
85
  ensure_mutable
86
86
 
87
- through_record = through_association.build through_scope_attributes
87
+ through_record = through_association.build(*options_for_through_record)
88
88
  through_record.send("#{source_reflection.name}=", record)
89
89
  through_record
90
90
  end
91
91
  end
92
92
 
93
+ def options_for_through_record
94
+ [through_scope_attributes]
95
+ end
96
+
93
97
  def through_scope_attributes
94
- scope.where_values_hash(through_association.reflection.name.to_s)
98
+ scope.where_values_hash(through_association.reflection.name.to_s).except!(through_association.reflection.foreign_key)
95
99
  end
96
100
 
97
101
  def save_through_record(record)
@@ -305,8 +305,8 @@ module ActiveRecord #:nodoc:
305
305
  include Locking::Optimistic
306
306
  include Locking::Pessimistic
307
307
  include AttributeMethods
308
- include Timestamp
309
308
  include Callbacks
309
+ include Timestamp
310
310
  include Associations
311
311
  include ActiveModel::SecurePassword
312
312
  include AutosaveAssociation
@@ -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.6.rc1"
4
+ Gem::Version.new "4.0.6.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.6.rc1
4
+ version: 4.0.6.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: 2014-05-27 00:00:00.000000000 Z
11
+ date: 2014-06-16 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.6.rc1
19
+ version: 4.0.6.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.6.rc1
26
+ version: 4.0.6.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.6.rc1
33
+ version: 4.0.6.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.6.rc1
40
+ version: 4.0.6.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement