activerecord 4.0.13 → 4.1.0.beta1
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 +745 -2700
- data/README.rdoc +2 -2
- data/examples/performance.rb +30 -18
- data/examples/simple.rb +4 -4
- data/lib/active_record.rb +2 -6
- data/lib/active_record/aggregations.rb +2 -1
- data/lib/active_record/association_relation.rb +0 -4
- data/lib/active_record/associations.rb +87 -43
- data/lib/active_record/associations/alias_tracker.rb +1 -3
- data/lib/active_record/associations/association.rb +8 -16
- data/lib/active_record/associations/association_scope.rb +5 -16
- data/lib/active_record/associations/belongs_to_association.rb +34 -25
- data/lib/active_record/associations/belongs_to_polymorphic_association.rb +1 -1
- data/lib/active_record/associations/builder/association.rb +78 -54
- data/lib/active_record/associations/builder/belongs_to.rb +91 -58
- data/lib/active_record/associations/builder/collection_association.rb +47 -45
- data/lib/active_record/associations/builder/has_and_belongs_to_many.rb +107 -25
- data/lib/active_record/associations/builder/has_many.rb +2 -2
- data/lib/active_record/associations/builder/has_one.rb +5 -7
- data/lib/active_record/associations/builder/singular_association.rb +6 -7
- data/lib/active_record/associations/collection_association.rb +68 -105
- data/lib/active_record/associations/collection_proxy.rb +12 -15
- data/lib/active_record/associations/has_many_association.rb +11 -9
- data/lib/active_record/associations/has_many_through_association.rb +16 -12
- data/lib/active_record/associations/has_one_association.rb +1 -1
- data/lib/active_record/associations/join_dependency.rb +204 -165
- data/lib/active_record/associations/join_dependency/join_association.rb +43 -101
- data/lib/active_record/associations/join_dependency/join_base.rb +6 -8
- data/lib/active_record/associations/join_dependency/join_part.rb +18 -37
- data/lib/active_record/associations/join_helper.rb +2 -11
- data/lib/active_record/associations/preloader.rb +89 -34
- data/lib/active_record/associations/preloader/association.rb +43 -25
- data/lib/active_record/associations/preloader/collection_association.rb +2 -2
- data/lib/active_record/associations/preloader/has_many_through.rb +1 -1
- data/lib/active_record/associations/preloader/singular_association.rb +3 -3
- data/lib/active_record/associations/preloader/through_association.rb +58 -26
- data/lib/active_record/associations/singular_association.rb +6 -5
- data/lib/active_record/associations/through_association.rb +2 -2
- data/lib/active_record/attribute_assignment.rb +5 -2
- data/lib/active_record/attribute_methods.rb +45 -40
- data/lib/active_record/attribute_methods/before_type_cast.rb +2 -1
- data/lib/active_record/attribute_methods/dirty.rb +8 -22
- data/lib/active_record/attribute_methods/primary_key.rb +1 -7
- data/lib/active_record/attribute_methods/read.rb +55 -28
- data/lib/active_record/attribute_methods/serialization.rb +12 -33
- data/lib/active_record/attribute_methods/time_zone_conversion.rb +1 -13
- data/lib/active_record/attribute_methods/write.rb +37 -12
- data/lib/active_record/autosave_association.rb +207 -207
- data/lib/active_record/base.rb +5 -1
- data/lib/active_record/callbacks.rb +2 -2
- data/lib/active_record/connection_adapters/abstract/connection_pool.rb +2 -7
- data/lib/active_record/connection_adapters/abstract/database_statements.rb +11 -22
- data/lib/active_record/connection_adapters/abstract/query_cache.rb +12 -14
- data/lib/active_record/connection_adapters/abstract/quoting.rb +1 -5
- data/lib/active_record/connection_adapters/abstract/savepoints.rb +21 -0
- data/lib/active_record/connection_adapters/abstract/schema_creation.rb +84 -0
- data/lib/active_record/connection_adapters/abstract/schema_definitions.rb +9 -8
- data/lib/active_record/connection_adapters/abstract/schema_statements.rb +52 -83
- data/lib/active_record/connection_adapters/abstract/transaction.rb +0 -5
- data/lib/active_record/connection_adapters/abstract_adapter.rb +14 -97
- data/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +58 -60
- data/lib/active_record/connection_adapters/column.rb +1 -35
- data/lib/active_record/connection_adapters/connection_specification.rb +2 -2
- data/lib/active_record/connection_adapters/mysql2_adapter.rb +3 -4
- data/lib/active_record/connection_adapters/mysql_adapter.rb +16 -15
- data/lib/active_record/connection_adapters/postgresql/array_parser.rb +24 -18
- data/lib/active_record/connection_adapters/postgresql/cast.rb +20 -16
- data/lib/active_record/connection_adapters/postgresql/database_statements.rb +23 -43
- data/lib/active_record/connection_adapters/postgresql/oid.rb +19 -12
- data/lib/active_record/connection_adapters/postgresql/quoting.rb +28 -23
- data/lib/active_record/connection_adapters/postgresql/schema_statements.rb +8 -30
- data/lib/active_record/connection_adapters/postgresql_adapter.rb +92 -75
- data/lib/active_record/connection_adapters/schema_cache.rb +8 -29
- data/lib/active_record/connection_adapters/sqlite3_adapter.rb +31 -64
- data/lib/active_record/connection_handling.rb +2 -2
- data/lib/active_record/core.rb +22 -43
- data/lib/active_record/counter_cache.rb +7 -7
- data/lib/active_record/enum.rb +100 -0
- data/lib/active_record/errors.rb +10 -5
- data/lib/active_record/fixture_set/file.rb +2 -1
- data/lib/active_record/fixtures.rb +171 -74
- data/lib/active_record/inheritance.rb +16 -22
- data/lib/active_record/integration.rb +52 -1
- data/lib/active_record/locking/optimistic.rb +7 -2
- data/lib/active_record/locking/pessimistic.rb +1 -1
- data/lib/active_record/log_subscriber.rb +5 -12
- data/lib/active_record/migration.rb +62 -46
- data/lib/active_record/migration/command_recorder.rb +7 -13
- data/lib/active_record/model_schema.rb +7 -14
- data/lib/active_record/nested_attributes.rb +10 -8
- data/lib/active_record/no_touching.rb +52 -0
- data/lib/active_record/null_relation.rb +3 -3
- data/lib/active_record/persistence.rb +16 -34
- data/lib/active_record/querying.rb +14 -12
- data/lib/active_record/railtie.rb +0 -50
- data/lib/active_record/railties/databases.rake +12 -15
- data/lib/active_record/readonly_attributes.rb +0 -6
- data/lib/active_record/reflection.rb +189 -75
- data/lib/active_record/relation.rb +69 -94
- data/lib/active_record/relation/batches.rb +57 -23
- data/lib/active_record/relation/calculations.rb +36 -43
- data/lib/active_record/relation/delegation.rb +54 -39
- data/lib/active_record/relation/finder_methods.rb +107 -62
- data/lib/active_record/relation/merger.rb +7 -20
- data/lib/active_record/relation/predicate_builder.rb +57 -38
- data/lib/active_record/relation/predicate_builder/array_handler.rb +29 -0
- data/lib/active_record/relation/predicate_builder/relation_handler.rb +13 -0
- data/lib/active_record/relation/query_methods.rb +110 -98
- data/lib/active_record/relation/spawn_methods.rb +1 -2
- data/lib/active_record/result.rb +45 -6
- data/lib/active_record/runtime_registry.rb +5 -0
- data/lib/active_record/sanitization.rb +6 -8
- data/lib/active_record/schema_dumper.rb +16 -5
- data/lib/active_record/schema_migration.rb +24 -25
- data/lib/active_record/scoping/default.rb +5 -18
- data/lib/active_record/scoping/named.rb +8 -29
- data/lib/active_record/store.rb +56 -28
- data/lib/active_record/tasks/database_tasks.rb +8 -4
- data/lib/active_record/timestamp.rb +4 -4
- data/lib/active_record/transactions.rb +8 -10
- data/lib/active_record/validations/presence.rb +1 -1
- data/lib/active_record/validations/uniqueness.rb +1 -6
- data/lib/active_record/version.rb +1 -1
- data/lib/rails/generators/active_record.rb +2 -8
- data/lib/rails/generators/active_record/migration.rb +18 -0
- data/lib/rails/generators/active_record/migration/migration_generator.rb +4 -0
- data/lib/rails/generators/active_record/model/model_generator.rb +4 -0
- metadata +32 -45
- data/lib/active_record/associations/has_and_belongs_to_many_association.rb +0 -65
- data/lib/active_record/associations/preloader/has_and_belongs_to_many.rb +0 -60
- data/lib/active_record/tasks/firebird_database_tasks.rb +0 -56
- data/lib/active_record/tasks/oracle_database_tasks.rb +0 -45
- data/lib/active_record/tasks/sqlserver_database_tasks.rb +0 -48
- data/lib/active_record/test_case.rb +0 -102
@@ -51,10 +51,6 @@ module ActiveRecord
|
|
51
51
|
register_task(/postgresql/, ActiveRecord::Tasks::PostgreSQLDatabaseTasks)
|
52
52
|
register_task(/sqlite/, ActiveRecord::Tasks::SQLiteDatabaseTasks)
|
53
53
|
|
54
|
-
register_task(/firebird/, ActiveRecord::Tasks::FirebirdDatabaseTasks)
|
55
|
-
register_task(/sqlserver/, ActiveRecord::Tasks::SqlserverDatabaseTasks)
|
56
|
-
register_task(/(oci|oracle)/, ActiveRecord::Tasks::OracleDatabaseTasks)
|
57
|
-
|
58
54
|
def current_config(options = {})
|
59
55
|
options.reverse_merge! :env => env
|
60
56
|
if options.has_key?(:config)
|
@@ -149,6 +145,14 @@ module ActiveRecord
|
|
149
145
|
class_for_adapter(configuration['adapter']).new(*arguments).structure_load(filename)
|
150
146
|
end
|
151
147
|
|
148
|
+
def check_schema_file(filename)
|
149
|
+
unless File.exist?(filename)
|
150
|
+
message = %{#{filename} doesn't exist yet. Run `rake db:migrate` to create it, then try again.}
|
151
|
+
message << %{ If you do not intend to use a database, you should instead alter #{Rails.root}/config/application.rb to limit the frameworks that will be loaded.} if defined?(::Rails)
|
152
|
+
Kernel.abort message
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
152
156
|
def load_seed
|
153
157
|
if seed_loader
|
154
158
|
seed_loader.load_seed
|
@@ -43,7 +43,7 @@ module ActiveRecord
|
|
43
43
|
|
44
44
|
private
|
45
45
|
|
46
|
-
def
|
46
|
+
def create_record
|
47
47
|
if self.record_timestamps
|
48
48
|
current_time = current_time_from_proper_timezone
|
49
49
|
|
@@ -57,7 +57,7 @@ module ActiveRecord
|
|
57
57
|
super
|
58
58
|
end
|
59
59
|
|
60
|
-
def
|
60
|
+
def update_record(*args)
|
61
61
|
if should_record_timestamps?
|
62
62
|
current_time = current_time_from_proper_timezone
|
63
63
|
|
@@ -98,8 +98,8 @@ module ActiveRecord
|
|
98
98
|
timestamp_attributes_for_create + timestamp_attributes_for_update
|
99
99
|
end
|
100
100
|
|
101
|
-
def max_updated_column_timestamp
|
102
|
-
if (timestamps =
|
101
|
+
def max_updated_column_timestamp(timestamp_names = timestamp_attributes_for_update)
|
102
|
+
if (timestamps = timestamp_names.map { |attr| self[attr] }.compact).present?
|
103
103
|
timestamps.map { |ts| ts.to_time }.max
|
104
104
|
end
|
105
105
|
end
|
@@ -10,7 +10,9 @@ module ActiveRecord
|
|
10
10
|
end
|
11
11
|
|
12
12
|
included do
|
13
|
-
define_callbacks :commit, :rollback,
|
13
|
+
define_callbacks :commit, :rollback,
|
14
|
+
terminator: ->(_, result) { result == false },
|
15
|
+
scope: [:kind, :name]
|
14
16
|
end
|
15
17
|
|
16
18
|
# = Active Record Transactions
|
@@ -275,10 +277,6 @@ module ActiveRecord
|
|
275
277
|
with_transaction_returning_status { super }
|
276
278
|
end
|
277
279
|
|
278
|
-
def touch(*) #:nodoc:
|
279
|
-
with_transaction_returning_status { super }
|
280
|
-
end
|
281
|
-
|
282
280
|
# Reset id and @new_record if the transaction rolls back.
|
283
281
|
def rollback_active_record_state!
|
284
282
|
remember_transaction_record_state
|
@@ -297,7 +295,7 @@ module ActiveRecord
|
|
297
295
|
def committed! #:nodoc:
|
298
296
|
run_callbacks :commit if destroyed? || persisted?
|
299
297
|
ensure
|
300
|
-
|
298
|
+
clear_transaction_record_state
|
301
299
|
end
|
302
300
|
|
303
301
|
# Call the +after_rollback+ callbacks. The +force_restore_state+ argument indicates if the record
|
@@ -306,6 +304,7 @@ module ActiveRecord
|
|
306
304
|
run_callbacks :rollback
|
307
305
|
ensure
|
308
306
|
restore_transaction_record_state(force_restore_state)
|
307
|
+
clear_transaction_record_state
|
309
308
|
end
|
310
309
|
|
311
310
|
# Add the record to the current transaction so that the +after_rollback+ and +after_commit+ callbacks
|
@@ -362,21 +361,20 @@ module ActiveRecord
|
|
362
361
|
# Restore the new record state and id of a record that was previously saved by a call to save_record_state.
|
363
362
|
def restore_transaction_record_state(force = false) #:nodoc:
|
364
363
|
unless @_start_transaction_state.empty?
|
365
|
-
|
366
|
-
if
|
364
|
+
transaction_level = (@_start_transaction_state[:level] || 0) - 1
|
365
|
+
if transaction_level < 1 || force
|
367
366
|
restore_state = @_start_transaction_state
|
368
367
|
was_frozen = restore_state[:frozen?]
|
369
368
|
@attributes = @attributes.dup if @attributes.frozen?
|
370
369
|
@new_record = restore_state[:new_record]
|
371
370
|
@destroyed = restore_state[:destroyed]
|
372
371
|
if restore_state.has_key?(:id)
|
373
|
-
|
372
|
+
self.id = restore_state[:id]
|
374
373
|
else
|
375
374
|
@attributes.delete(self.class.primary_key)
|
376
375
|
@attributes_cache.delete(self.class.primary_key)
|
377
376
|
end
|
378
377
|
@attributes.freeze if was_frozen
|
379
|
-
@_start_transaction_state.clear
|
380
378
|
end
|
381
379
|
end
|
382
380
|
end
|
@@ -5,7 +5,7 @@ module ActiveRecord
|
|
5
5
|
super
|
6
6
|
attributes.each do |attribute|
|
7
7
|
next unless record.class.reflect_on_association(attribute)
|
8
|
-
associated_records = Array
|
8
|
+
associated_records = Array(record.send(attribute))
|
9
9
|
|
10
10
|
# Superclass validates presence. Ensure present records aren't about to be destroyed.
|
11
11
|
if associated_records.present? && associated_records.all? { |r| r.marked_for_destruction? }
|
@@ -7,11 +7,7 @@ module ActiveRecord
|
|
7
7
|
"Pass a callable instead: `conditions: -> { where(approved: true) }`"
|
8
8
|
end
|
9
9
|
super({ case_sensitive: true }.merge!(options))
|
10
|
-
|
11
|
-
|
12
|
-
# Unfortunately, we have to tie Uniqueness validators to a class.
|
13
|
-
def setup(klass)
|
14
|
-
@klass = klass
|
10
|
+
@klass = options[:class]
|
15
11
|
end
|
16
12
|
|
17
13
|
def validate_each(record, attribute, value)
|
@@ -34,7 +30,6 @@ module ActiveRecord
|
|
34
30
|
end
|
35
31
|
|
36
32
|
protected
|
37
|
-
|
38
33
|
# The check for an existing value should be run from a class that
|
39
34
|
# isn't abstract. This means working down from the current class
|
40
35
|
# (self), to the first non-abstract class. Since classes don't know
|
@@ -1,23 +1,17 @@
|
|
1
1
|
require 'rails/generators/named_base'
|
2
|
-
require 'rails/generators/migration'
|
3
2
|
require 'rails/generators/active_model'
|
3
|
+
require 'rails/generators/active_record/migration'
|
4
4
|
require 'active_record'
|
5
5
|
|
6
6
|
module ActiveRecord
|
7
7
|
module Generators # :nodoc:
|
8
8
|
class Base < Rails::Generators::NamedBase # :nodoc:
|
9
|
-
include
|
9
|
+
include ActiveRecord::Generators::Migration
|
10
10
|
|
11
11
|
# Set the current directory as base for the inherited generators.
|
12
12
|
def self.base_root
|
13
13
|
File.dirname(__FILE__)
|
14
14
|
end
|
15
|
-
|
16
|
-
# Implement the required interface for Rails::Generators::Migration.
|
17
|
-
def self.next_migration_number(dirname)
|
18
|
-
next_migration_number = current_migration_number(dirname) + 1
|
19
|
-
ActiveRecord::Migration.next_migration_number(next_migration_number)
|
20
|
-
end
|
21
15
|
end
|
22
16
|
end
|
23
17
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rails/generators/migration'
|
2
|
+
|
3
|
+
module ActiveRecord
|
4
|
+
module Generators # :nodoc:
|
5
|
+
module Migration
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
include Rails::Generators::Migration
|
8
|
+
|
9
|
+
module ClassMethods
|
10
|
+
# Implement the required interface for Rails::Generators::Migration.
|
11
|
+
def next_migration_number(dirname)
|
12
|
+
next_migration_number = current_migration_number(dirname) + 1
|
13
|
+
ActiveRecord::Migration.next_migration_number(next_migration_number)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -14,6 +14,10 @@ module ActiveRecord
|
|
14
14
|
protected
|
15
15
|
attr_reader :migration_action, :join_tables
|
16
16
|
|
17
|
+
# sets the default migration template that is being used for the generation of the migration
|
18
|
+
# depending on the arguments which would be sent out in the command line, the migration template
|
19
|
+
# and the table name instance variables are setup.
|
20
|
+
|
17
21
|
def set_local_assigns!
|
18
22
|
@migration_template = "migration.rb"
|
19
23
|
case file_name
|
@@ -12,6 +12,9 @@ module ActiveRecord
|
|
12
12
|
class_option :parent, :type => :string, :desc => "The parent class for the generated model"
|
13
13
|
class_option :indexes, :type => :boolean, :default => true, :desc => "Add indexes for references and belongs_to columns"
|
14
14
|
|
15
|
+
|
16
|
+
# creates the migration file for the model.
|
17
|
+
|
15
18
|
def create_migration_file
|
16
19
|
return unless options[:migration] && options[:parent].nil?
|
17
20
|
attributes.each { |a| a.attr_options.delete(:index) if a.reference? && !a.has_index? } if options[:indexes] == false
|
@@ -39,6 +42,7 @@ module ActiveRecord
|
|
39
42
|
|
40
43
|
protected
|
41
44
|
|
45
|
+
# Used by the migration template to determine the parent name of the model
|
42
46
|
def parent_class_name
|
43
47
|
options[:parent] || "ActiveRecord::Base"
|
44
48
|
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.0.
|
4
|
+
version: 4.1.0.beta1
|
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:
|
11
|
+
date: 2013-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,56 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0.
|
19
|
+
version: 4.1.0.beta1
|
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.
|
26
|
+
version: 4.1.0.beta1
|
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.
|
33
|
+
version: 4.1.0.beta1
|
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.
|
40
|
+
version: 4.1.0.beta1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: arel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 5.0.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: activerecord-deprecated_finders
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 1.0.2
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 1.0.2
|
54
|
+
version: 5.0.0
|
69
55
|
description: Databases on Rails. Build a persistent domain model by mapping database
|
70
56
|
tables to Ruby classes. Strong conventions for associations, validations, aggregations,
|
71
57
|
migrations, and testing come baked-in.
|
@@ -80,10 +66,8 @@ files:
|
|
80
66
|
- README.rdoc
|
81
67
|
- examples/performance.rb
|
82
68
|
- examples/simple.rb
|
83
|
-
- lib/active_record.rb
|
84
69
|
- lib/active_record/aggregations.rb
|
85
70
|
- lib/active_record/association_relation.rb
|
86
|
-
- lib/active_record/associations.rb
|
87
71
|
- lib/active_record/associations/alias_tracker.rb
|
88
72
|
- lib/active_record/associations/association.rb
|
89
73
|
- lib/active_record/associations/association_scope.rb
|
@@ -98,31 +82,29 @@ files:
|
|
98
82
|
- lib/active_record/associations/builder/singular_association.rb
|
99
83
|
- lib/active_record/associations/collection_association.rb
|
100
84
|
- lib/active_record/associations/collection_proxy.rb
|
101
|
-
- lib/active_record/associations/has_and_belongs_to_many_association.rb
|
102
85
|
- lib/active_record/associations/has_many_association.rb
|
103
86
|
- lib/active_record/associations/has_many_through_association.rb
|
104
87
|
- lib/active_record/associations/has_one_association.rb
|
105
88
|
- lib/active_record/associations/has_one_through_association.rb
|
106
|
-
- lib/active_record/associations/join_dependency.rb
|
107
89
|
- lib/active_record/associations/join_dependency/join_association.rb
|
108
90
|
- lib/active_record/associations/join_dependency/join_base.rb
|
109
91
|
- lib/active_record/associations/join_dependency/join_part.rb
|
92
|
+
- lib/active_record/associations/join_dependency.rb
|
110
93
|
- lib/active_record/associations/join_helper.rb
|
111
|
-
- lib/active_record/associations/preloader.rb
|
112
94
|
- lib/active_record/associations/preloader/association.rb
|
113
95
|
- lib/active_record/associations/preloader/belongs_to.rb
|
114
96
|
- lib/active_record/associations/preloader/collection_association.rb
|
115
|
-
- lib/active_record/associations/preloader/has_and_belongs_to_many.rb
|
116
97
|
- lib/active_record/associations/preloader/has_many.rb
|
117
98
|
- lib/active_record/associations/preloader/has_many_through.rb
|
118
99
|
- lib/active_record/associations/preloader/has_one.rb
|
119
100
|
- lib/active_record/associations/preloader/has_one_through.rb
|
120
101
|
- lib/active_record/associations/preloader/singular_association.rb
|
121
102
|
- lib/active_record/associations/preloader/through_association.rb
|
103
|
+
- lib/active_record/associations/preloader.rb
|
122
104
|
- lib/active_record/associations/singular_association.rb
|
123
105
|
- lib/active_record/associations/through_association.rb
|
106
|
+
- lib/active_record/associations.rb
|
124
107
|
- lib/active_record/attribute_assignment.rb
|
125
|
-
- lib/active_record/attribute_methods.rb
|
126
108
|
- lib/active_record/attribute_methods/before_type_cast.rb
|
127
109
|
- lib/active_record/attribute_methods/dirty.rb
|
128
110
|
- lib/active_record/attribute_methods/primary_key.rb
|
@@ -131,6 +113,7 @@ files:
|
|
131
113
|
- lib/active_record/attribute_methods/serialization.rb
|
132
114
|
- lib/active_record/attribute_methods/time_zone_conversion.rb
|
133
115
|
- lib/active_record/attribute_methods/write.rb
|
116
|
+
- lib/active_record/attribute_methods.rb
|
134
117
|
- lib/active_record/autosave_association.rb
|
135
118
|
- lib/active_record/base.rb
|
136
119
|
- lib/active_record/callbacks.rb
|
@@ -140,6 +123,8 @@ files:
|
|
140
123
|
- lib/active_record/connection_adapters/abstract/database_statements.rb
|
141
124
|
- lib/active_record/connection_adapters/abstract/query_cache.rb
|
142
125
|
- lib/active_record/connection_adapters/abstract/quoting.rb
|
126
|
+
- lib/active_record/connection_adapters/abstract/savepoints.rb
|
127
|
+
- lib/active_record/connection_adapters/abstract/schema_creation.rb
|
143
128
|
- lib/active_record/connection_adapters/abstract/schema_definitions.rb
|
144
129
|
- lib/active_record/connection_adapters/abstract/schema_dumper.rb
|
145
130
|
- lib/active_record/connection_adapters/abstract/schema_statements.rb
|
@@ -165,6 +150,7 @@ files:
|
|
165
150
|
- lib/active_record/core.rb
|
166
151
|
- lib/active_record/counter_cache.rb
|
167
152
|
- lib/active_record/dynamic_matchers.rb
|
153
|
+
- lib/active_record/enum.rb
|
168
154
|
- lib/active_record/errors.rb
|
169
155
|
- lib/active_record/explain.rb
|
170
156
|
- lib/active_record/explain_registry.rb
|
@@ -177,11 +163,12 @@ files:
|
|
177
163
|
- lib/active_record/locking/optimistic.rb
|
178
164
|
- lib/active_record/locking/pessimistic.rb
|
179
165
|
- lib/active_record/log_subscriber.rb
|
180
|
-
- lib/active_record/migration.rb
|
181
166
|
- lib/active_record/migration/command_recorder.rb
|
182
167
|
- lib/active_record/migration/join_table.rb
|
168
|
+
- lib/active_record/migration.rb
|
183
169
|
- lib/active_record/model_schema.rb
|
184
170
|
- lib/active_record/nested_attributes.rb
|
171
|
+
- lib/active_record/no_touching.rb
|
185
172
|
- lib/active_record/null_relation.rb
|
186
173
|
- lib/active_record/persistence.rb
|
187
174
|
- lib/active_record/query_cache.rb
|
@@ -193,74 +180,74 @@ files:
|
|
193
180
|
- lib/active_record/railties/jdbcmysql_error.rb
|
194
181
|
- lib/active_record/readonly_attributes.rb
|
195
182
|
- lib/active_record/reflection.rb
|
196
|
-
- lib/active_record/relation.rb
|
197
183
|
- lib/active_record/relation/batches.rb
|
198
184
|
- lib/active_record/relation/calculations.rb
|
199
185
|
- lib/active_record/relation/delegation.rb
|
200
186
|
- lib/active_record/relation/finder_methods.rb
|
201
187
|
- lib/active_record/relation/merger.rb
|
188
|
+
- lib/active_record/relation/predicate_builder/array_handler.rb
|
189
|
+
- lib/active_record/relation/predicate_builder/relation_handler.rb
|
202
190
|
- lib/active_record/relation/predicate_builder.rb
|
203
191
|
- lib/active_record/relation/query_methods.rb
|
204
192
|
- lib/active_record/relation/spawn_methods.rb
|
193
|
+
- lib/active_record/relation.rb
|
205
194
|
- lib/active_record/result.rb
|
206
195
|
- lib/active_record/runtime_registry.rb
|
207
196
|
- lib/active_record/sanitization.rb
|
208
197
|
- lib/active_record/schema.rb
|
209
198
|
- lib/active_record/schema_dumper.rb
|
210
199
|
- lib/active_record/schema_migration.rb
|
211
|
-
- lib/active_record/scoping.rb
|
212
200
|
- lib/active_record/scoping/default.rb
|
213
201
|
- lib/active_record/scoping/named.rb
|
202
|
+
- lib/active_record/scoping.rb
|
214
203
|
- lib/active_record/serialization.rb
|
215
204
|
- lib/active_record/serializers/xml_serializer.rb
|
216
205
|
- lib/active_record/statement_cache.rb
|
217
206
|
- lib/active_record/store.rb
|
218
207
|
- lib/active_record/tasks/database_tasks.rb
|
219
|
-
- lib/active_record/tasks/firebird_database_tasks.rb
|
220
208
|
- lib/active_record/tasks/mysql_database_tasks.rb
|
221
|
-
- lib/active_record/tasks/oracle_database_tasks.rb
|
222
209
|
- lib/active_record/tasks/postgresql_database_tasks.rb
|
223
210
|
- lib/active_record/tasks/sqlite_database_tasks.rb
|
224
|
-
- lib/active_record/tasks/sqlserver_database_tasks.rb
|
225
|
-
- lib/active_record/test_case.rb
|
226
211
|
- lib/active_record/timestamp.rb
|
227
212
|
- lib/active_record/transactions.rb
|
228
213
|
- lib/active_record/translation.rb
|
229
|
-
- lib/active_record/validations.rb
|
230
214
|
- lib/active_record/validations/associated.rb
|
231
215
|
- lib/active_record/validations/presence.rb
|
232
216
|
- lib/active_record/validations/uniqueness.rb
|
217
|
+
- lib/active_record/validations.rb
|
233
218
|
- lib/active_record/version.rb
|
234
|
-
- lib/
|
219
|
+
- lib/active_record.rb
|
235
220
|
- lib/rails/generators/active_record/migration/migration_generator.rb
|
236
221
|
- lib/rails/generators/active_record/migration/templates/create_table_migration.rb
|
237
222
|
- lib/rails/generators/active_record/migration/templates/migration.rb
|
223
|
+
- lib/rails/generators/active_record/migration.rb
|
238
224
|
- lib/rails/generators/active_record/model/model_generator.rb
|
239
225
|
- lib/rails/generators/active_record/model/templates/model.rb
|
240
226
|
- lib/rails/generators/active_record/model/templates/module.rb
|
227
|
+
- lib/rails/generators/active_record.rb
|
241
228
|
homepage: http://www.rubyonrails.org
|
242
229
|
licenses:
|
243
230
|
- MIT
|
244
231
|
metadata: {}
|
245
232
|
post_install_message:
|
246
233
|
rdoc_options:
|
247
|
-
-
|
234
|
+
- --main
|
248
235
|
- README.rdoc
|
249
236
|
require_paths:
|
250
237
|
- lib
|
251
238
|
required_ruby_version: !ruby/object:Gem::Requirement
|
252
239
|
requirements:
|
253
|
-
- -
|
240
|
+
- - '>='
|
254
241
|
- !ruby/object:Gem::Version
|
255
242
|
version: 1.9.3
|
256
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
244
|
requirements:
|
258
|
-
- -
|
245
|
+
- - '>'
|
259
246
|
- !ruby/object:Gem::Version
|
260
|
-
version:
|
247
|
+
version: 1.3.1
|
261
248
|
requirements: []
|
262
249
|
rubyforge_project:
|
263
|
-
rubygems_version: 2.
|
250
|
+
rubygems_version: 2.1.11
|
264
251
|
signing_key:
|
265
252
|
specification_version: 4
|
266
253
|
summary: Object-relational mapper framework (part of Rails).
|