activerecord 3.1.0.rc6 → 3.1.0.rc8

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.

@@ -79,8 +79,10 @@ module ActiveRecord
79
79
  end
80
80
 
81
81
  def invert_add_index(args)
82
- table, columns, _ = *args
83
- [:remove_index, [table, {:column => columns}]]
82
+ table, columns, options = *args
83
+ index_name = options.try(:[], :name)
84
+ options_hash = index_name ? {:name => index_name} : {:column => columns}
85
+ [:remove_index, [table, options_hash]]
84
86
  end
85
87
 
86
88
  def invert_remove_timestamps(args)
@@ -61,6 +61,12 @@ module ActiveRecord
61
61
 
62
62
  status, headers, body = @app.call(env)
63
63
  [status, headers, BodyProxy.new(old, body)]
64
+ rescue Exception => e
65
+ ActiveRecord::Base.connection.clear_query_cache
66
+ unless old
67
+ ActiveRecord::Base.connection.disable_query_cache!
68
+ end
69
+ raise e
64
70
  end
65
71
  end
66
72
  end
@@ -94,7 +94,7 @@ db_namespace = namespace :db do
94
94
  "IDENTIFIED BY '#{config['password']}' WITH GRANT OPTION;"
95
95
  ActiveRecord::Base.establish_connection(config.merge(
96
96
  'database' => nil, 'username' => 'root', 'password' => root_password))
97
- ActiveRecord::Base.connection.create_database(config['database'], creation_options)
97
+ ActiveRecord::Base.connection.create_database(config['database'], mysql_creation_options(config))
98
98
  ActiveRecord::Base.connection.execute grant_statement
99
99
  ActiveRecord::Base.establish_connection(config)
100
100
  else
@@ -19,7 +19,7 @@ module ActiveRecord
19
19
 
20
20
  case value
21
21
  when ActiveRecord::Relation
22
- value.select_values = [value.klass.arel_table['id']] if value.select_values.empty?
22
+ value = value.select(value.klass.arel_table[value.klass.primary_key]) if value.select_values.empty?
23
23
  attribute.in(value.arel.ast)
24
24
  when Array, ActiveRecord::Associations::CollectionProxy
25
25
  values = value.to_a.map { |x|
@@ -3,7 +3,7 @@ module ActiveRecord
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
5
  TINY = 0
6
- PRE = "rc6"
6
+ PRE = "rc8"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424105
5
- prerelease: 6
4
+ hash: 977940593
5
+ prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
9
  - 0
10
- - rc
11
- - 6
12
- version: 3.1.0.rc6
10
+ - rc8
11
+ version: 3.1.0.rc8
13
12
  platform: ruby
14
13
  authors:
15
14
  - David Heinemeier Hansson
@@ -17,7 +16,8 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2011-08-16 00:00:00 Z
19
+ date: 2011-08-29 00:00:00 -03:00
20
+ default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: activesupport
@@ -27,14 +27,13 @@ dependencies:
27
27
  requirements:
28
28
  - - "="
29
29
  - !ruby/object:Gem::Version
30
- hash: 15424105
30
+ hash: 977940593
31
31
  segments:
32
32
  - 3
33
33
  - 1
34
34
  - 0
35
- - rc
36
- - 6
37
- version: 3.1.0.rc6
35
+ - rc8
36
+ version: 3.1.0.rc8
38
37
  type: :runtime
39
38
  version_requirements: *id001
40
39
  - !ruby/object:Gem::Dependency
@@ -45,14 +44,13 @@ dependencies:
45
44
  requirements:
46
45
  - - "="
47
46
  - !ruby/object:Gem::Version
48
- hash: 15424105
47
+ hash: 977940593
49
48
  segments:
50
49
  - 3
51
50
  - 1
52
51
  - 0
53
- - rc
54
- - 6
55
- version: 3.1.0.rc6
52
+ - rc8
53
+ version: 3.1.0.rc8
56
54
  type: :runtime
57
55
  version_requirements: *id002
58
56
  - !ruby/object:Gem::Dependency
@@ -223,6 +221,7 @@ files:
223
221
  - lib/rails/generators/active_record/session_migration/session_migration_generator.rb
224
222
  - lib/rails/generators/active_record/session_migration/templates/migration.rb
225
223
  - lib/rails/generators/active_record.rb
224
+ has_rdoc: true
226
225
  homepage: http://www.rubyonrails.org
227
226
  licenses: []
228
227
 
@@ -257,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
256
  requirements: []
258
257
 
259
258
  rubyforge_project:
260
- rubygems_version: 1.8.8
259
+ rubygems_version: 1.3.7
261
260
  signing_key:
262
261
  specification_version: 3
263
262
  summary: Object-relational mapper framework (part of Rails).