activerecord 4.0.0.rc2 → 4.0.0
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 +4 -4
- data/CHANGELOG.md +1 -7
- data/lib/active_record/attribute_methods/serialization.rb +5 -1
- data/lib/active_record/connection_adapters/abstract/schema_definitions.rb +1 -2
- data/lib/active_record/connection_adapters/abstract/schema_statements.rb +2 -2
- data/lib/active_record/railtie.rb +13 -8
- data/lib/active_record/railties/databases.rake +1 -1
- data/lib/active_record/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76ddb57b66b29722a983d38eba75ebc3e94610ea
|
4
|
+
data.tar.gz: 743a630e5e1722c2655ca8c167dbb5be2ab49afb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a643a5988de90b3145ab259ecc0f20acba5e66db188ad8ebfbdd12e14352e26d696faf570cc04c2da30e70bc1a490d9107cb4086f59b90614088941c96f095e3
|
7
|
+
data.tar.gz: 513f56748c0e72bc073a068f29846737aeb95c11fd3fc23672295027a6d475c2764613f3b1653cdb8d32ac61b4dfcff32cade6279fad13ad4030bd1e01e536b0
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## Rails 4.0.0
|
1
|
+
## Rails 4.0.0 (June 25, 2013) ##
|
2
2
|
|
3
3
|
* Fix `add_column` with `array` option when using PostgreSQL. Fixes #10432
|
4
4
|
|
@@ -50,9 +50,6 @@
|
|
50
50
|
|
51
51
|
*Godfrey Chan*
|
52
52
|
|
53
|
-
|
54
|
-
## Rails 4.0.0.rc1 (April 29, 2013) ##
|
55
|
-
|
56
53
|
* Trigger a save on `has_one association=(associate)` when the associate contents have changed.
|
57
54
|
|
58
55
|
Fix #8856.
|
@@ -593,9 +590,6 @@
|
|
593
590
|
# This will expand the order :name to "authors".name.
|
594
591
|
Author.joins(:books).where('books.published = 1').order(:name)
|
595
592
|
|
596
|
-
|
597
|
-
## Rails 4.0.0.beta1 (February 25, 2013) ##
|
598
|
-
|
599
593
|
* Fix overriding of attributes by `default_scope` on `ActiveRecord::Base#dup`.
|
600
594
|
|
601
595
|
*Hiroshige UMINO*
|
@@ -63,7 +63,11 @@ module ActiveRecord
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def type_cast(value)
|
66
|
-
value.
|
66
|
+
if value.state == :serialized
|
67
|
+
value.unserialized_value @column.type_cast value.value
|
68
|
+
else
|
69
|
+
value.unserialized_value
|
70
|
+
end
|
67
71
|
end
|
68
72
|
|
69
73
|
def type
|
@@ -65,8 +65,7 @@ module ActiveRecord
|
|
65
65
|
# Appends a primary key definition to the table definition.
|
66
66
|
# Can be called multiple times, but this is probably not a good idea.
|
67
67
|
def primary_key(name, type = :primary_key, options = {})
|
68
|
-
options
|
69
|
-
column(name, type, options)
|
68
|
+
column(name, type, options.merge(:primary_key => true))
|
70
69
|
end
|
71
70
|
|
72
71
|
# Returns a ColumnDefinition for the column with name +name+.
|
@@ -214,8 +214,8 @@ module ActiveRecord
|
|
214
214
|
# its block form to do so yourself:
|
215
215
|
#
|
216
216
|
# create_join_table :products, :categories do |t|
|
217
|
-
# t.index :
|
218
|
-
# t.index :
|
217
|
+
# t.index :product_id
|
218
|
+
# t.index :category_id
|
219
219
|
# end
|
220
220
|
#
|
221
221
|
# ====== Add a backend specific option to the generated SQL (MySQL)
|
@@ -37,16 +37,21 @@ module ActiveRecord
|
|
37
37
|
rake_tasks do
|
38
38
|
require "active_record/base"
|
39
39
|
|
40
|
-
ActiveRecord::Tasks::DatabaseTasks.env = Rails.env
|
41
|
-
ActiveRecord::Tasks::DatabaseTasks.db_dir = Rails.application.config.paths["db"].first
|
42
40
|
ActiveRecord::Tasks::DatabaseTasks.seed_loader = Rails.application
|
43
|
-
ActiveRecord::Tasks::DatabaseTasks.
|
44
|
-
|
45
|
-
|
41
|
+
ActiveRecord::Tasks::DatabaseTasks.env = Rails.env
|
42
|
+
|
43
|
+
namespace :db do
|
44
|
+
task :load_config do
|
45
|
+
ActiveRecord::Tasks::DatabaseTasks.db_dir = Rails.application.config.paths["db"].first
|
46
|
+
ActiveRecord::Tasks::DatabaseTasks.database_configuration = Rails.application.config.database_configuration
|
47
|
+
ActiveRecord::Tasks::DatabaseTasks.migrations_paths = Rails.application.paths['db/migrate'].to_a
|
48
|
+
ActiveRecord::Tasks::DatabaseTasks.fixtures_path = File.join Rails.root, 'test', 'fixtures'
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
+
if defined?(ENGINE_PATH) && engine = Rails::Engine.find(ENGINE_PATH)
|
51
|
+
if engine.paths['db/migrate'].existent
|
52
|
+
ActiveRecord::Tasks::DatabaseTasks.migrations_paths += engine.paths['db/migrate'].to_a
|
53
|
+
end
|
54
|
+
end
|
50
55
|
end
|
51
56
|
end
|
52
57
|
|
@@ -326,7 +326,7 @@ db_namespace = namespace :db do
|
|
326
326
|
ActiveRecord::Schema.verbose = false
|
327
327
|
db_namespace["schema:load"].invoke
|
328
328
|
ensure
|
329
|
-
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations[
|
329
|
+
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations[ActiveRecord::Tasks::DatabaseTasks.env])
|
330
330
|
end
|
331
331
|
end
|
332
332
|
|
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.0
|
4
|
+
version: 4.0.0
|
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-06-
|
11
|
+
date: 2013-06-25 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.0
|
19
|
+
version: 4.0.0
|
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.0
|
26
|
+
version: 4.0.0
|
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.0
|
33
|
+
version: 4.0.0
|
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.0
|
40
|
+
version: 4.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: arel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,9 +254,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
254
254
|
version: 1.9.3
|
255
255
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
256
|
requirements:
|
257
|
-
- - '
|
257
|
+
- - '>='
|
258
258
|
- !ruby/object:Gem::Version
|
259
|
-
version:
|
259
|
+
version: '0'
|
260
260
|
requirements: []
|
261
261
|
rubyforge_project:
|
262
262
|
rubygems_version: 2.0.2
|