activerecord 5.0.7.2 → 5.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 +5 -5
- data/CHANGELOG.md +389 -2252
- data/MIT-LICENSE +1 -1
- data/README.rdoc +1 -1
- data/examples/performance.rb +28 -28
- data/examples/simple.rb +3 -3
- data/lib/active_record.rb +20 -20
- data/lib/active_record/aggregations.rb +244 -244
- data/lib/active_record/association_relation.rb +5 -5
- data/lib/active_record/associations.rb +1579 -1569
- data/lib/active_record/associations/alias_tracker.rb +1 -1
- data/lib/active_record/associations/association.rb +23 -15
- data/lib/active_record/associations/association_scope.rb +83 -81
- data/lib/active_record/associations/belongs_to_association.rb +0 -1
- data/lib/active_record/associations/builder/belongs_to.rb +16 -14
- data/lib/active_record/associations/builder/collection_association.rb +1 -2
- data/lib/active_record/associations/builder/has_and_belongs_to_many.rb +27 -27
- data/lib/active_record/associations/collection_association.rb +74 -241
- data/lib/active_record/associations/collection_proxy.rb +144 -70
- data/lib/active_record/associations/has_many_association.rb +15 -19
- data/lib/active_record/associations/has_many_through_association.rb +12 -5
- data/lib/active_record/associations/has_one_association.rb +22 -28
- data/lib/active_record/associations/has_one_through_association.rb +5 -1
- data/lib/active_record/associations/join_dependency.rb +117 -115
- data/lib/active_record/associations/join_dependency/join_association.rb +16 -13
- data/lib/active_record/associations/join_dependency/join_base.rb +1 -1
- data/lib/active_record/associations/join_dependency/join_part.rb +1 -1
- data/lib/active_record/associations/preloader.rb +94 -94
- data/lib/active_record/associations/preloader/association.rb +87 -64
- data/lib/active_record/associations/preloader/belongs_to.rb +0 -2
- data/lib/active_record/associations/preloader/collection_association.rb +6 -6
- data/lib/active_record/associations/preloader/has_many.rb +0 -2
- data/lib/active_record/associations/preloader/singular_association.rb +6 -8
- data/lib/active_record/associations/preloader/through_association.rb +34 -41
- data/lib/active_record/associations/singular_association.rb +8 -25
- data/lib/active_record/associations/through_association.rb +3 -6
- data/lib/active_record/attribute.rb +98 -71
- data/lib/active_record/attribute/user_provided_default.rb +4 -2
- data/lib/active_record/attribute_assignment.rb +61 -61
- data/lib/active_record/attribute_decorators.rb +35 -13
- data/lib/active_record/attribute_methods.rb +56 -65
- data/lib/active_record/attribute_methods/before_type_cast.rb +7 -7
- data/lib/active_record/attribute_methods/dirty.rb +216 -34
- data/lib/active_record/attribute_methods/primary_key.rb +78 -73
- data/lib/active_record/attribute_methods/read.rb +39 -35
- data/lib/active_record/attribute_methods/serialization.rb +7 -7
- data/lib/active_record/attribute_methods/time_zone_conversion.rb +35 -58
- data/lib/active_record/attribute_methods/write.rb +36 -30
- data/lib/active_record/attribute_mutation_tracker.rb +53 -10
- data/lib/active_record/attribute_set.rb +9 -6
- data/lib/active_record/attribute_set/builder.rb +41 -49
- data/lib/active_record/attribute_set/yaml_encoder.rb +41 -0
- data/lib/active_record/attributes.rb +21 -21
- data/lib/active_record/autosave_association.rb +13 -13
- data/lib/active_record/base.rb +24 -22
- data/lib/active_record/callbacks.rb +52 -14
- data/lib/active_record/coders/yaml_column.rb +9 -11
- data/lib/active_record/collection_cache_key.rb +6 -17
- data/lib/active_record/connection_adapters/abstract/connection_pool.rb +320 -278
- data/lib/active_record/connection_adapters/abstract/database_limits.rb +1 -3
- data/lib/active_record/connection_adapters/abstract/database_statements.rb +22 -34
- data/lib/active_record/connection_adapters/abstract/query_cache.rb +31 -27
- data/lib/active_record/connection_adapters/abstract/quoting.rb +44 -57
- data/lib/active_record/connection_adapters/abstract/schema_creation.rb +9 -19
- data/lib/active_record/connection_adapters/abstract/schema_definitions.rb +78 -79
- data/lib/active_record/connection_adapters/abstract/schema_dumper.rb +53 -41
- data/lib/active_record/connection_adapters/abstract/schema_statements.rb +99 -93
- data/lib/active_record/connection_adapters/abstract/transaction.rb +1 -5
- data/lib/active_record/connection_adapters/abstract_adapter.rb +156 -128
- data/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +424 -382
- data/lib/active_record/connection_adapters/column.rb +27 -5
- data/lib/active_record/connection_adapters/connection_specification.rb +128 -118
- data/lib/active_record/connection_adapters/mysql/column.rb +6 -31
- data/lib/active_record/connection_adapters/mysql/database_statements.rb +45 -43
- data/lib/active_record/connection_adapters/mysql/explain_pretty_printer.rb +22 -22
- data/lib/active_record/connection_adapters/mysql/quoting.rb +6 -12
- data/lib/active_record/connection_adapters/mysql/schema_creation.rb +49 -45
- data/lib/active_record/connection_adapters/mysql/schema_definitions.rb +16 -19
- data/lib/active_record/connection_adapters/mysql/schema_dumper.rb +49 -31
- data/lib/active_record/connection_adapters/mysql/type_metadata.rb +5 -6
- data/lib/active_record/connection_adapters/mysql2_adapter.rb +24 -26
- data/lib/active_record/connection_adapters/postgresql/column.rb +1 -28
- data/lib/active_record/connection_adapters/postgresql/database_statements.rb +46 -35
- data/lib/active_record/connection_adapters/postgresql/explain_pretty_printer.rb +3 -3
- data/lib/active_record/connection_adapters/postgresql/oid.rb +22 -21
- data/lib/active_record/connection_adapters/postgresql/oid/array.rb +9 -9
- data/lib/active_record/connection_adapters/postgresql/oid/bit.rb +5 -3
- data/lib/active_record/connection_adapters/postgresql/oid/bytea.rb +1 -1
- data/lib/active_record/connection_adapters/postgresql/oid/cidr.rb +1 -1
- data/lib/active_record/connection_adapters/postgresql/oid/date_time.rb +2 -2
- data/lib/active_record/connection_adapters/postgresql/oid/enum.rb +3 -3
- data/lib/active_record/connection_adapters/postgresql/oid/hstore.rb +16 -16
- data/lib/active_record/connection_adapters/postgresql/oid/{rails_5_1_point.rb → legacy_point.rb} +9 -16
- data/lib/active_record/connection_adapters/postgresql/oid/money.rb +2 -2
- data/lib/active_record/connection_adapters/postgresql/oid/oid.rb +13 -0
- data/lib/active_record/connection_adapters/postgresql/oid/point.rb +28 -8
- data/lib/active_record/connection_adapters/postgresql/oid/range.rb +28 -30
- data/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb +2 -1
- data/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb +51 -51
- data/lib/active_record/connection_adapters/postgresql/quoting.rb +38 -36
- data/lib/active_record/connection_adapters/postgresql/schema_creation.rb +15 -0
- data/lib/active_record/connection_adapters/postgresql/schema_definitions.rb +37 -24
- data/lib/active_record/connection_adapters/postgresql/schema_dumper.rb +19 -23
- data/lib/active_record/connection_adapters/postgresql/schema_statements.rb +161 -170
- data/lib/active_record/connection_adapters/postgresql/type_metadata.rb +4 -4
- data/lib/active_record/connection_adapters/postgresql/utils.rb +9 -7
- data/lib/active_record/connection_adapters/postgresql_adapter.rb +179 -152
- data/lib/active_record/connection_adapters/schema_cache.rb +16 -7
- data/lib/active_record/connection_adapters/sql_type_metadata.rb +3 -3
- data/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb +1 -1
- data/lib/active_record/connection_adapters/sqlite3/quoting.rb +16 -20
- data/lib/active_record/connection_adapters/sqlite3/schema_creation.rb +1 -8
- data/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb +28 -0
- data/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb +17 -0
- data/lib/active_record/connection_adapters/sqlite3_adapter.rb +187 -130
- data/lib/active_record/connection_adapters/statement_pool.rb +7 -7
- data/lib/active_record/connection_handling.rb +14 -26
- data/lib/active_record/core.rb +110 -93
- data/lib/active_record/counter_cache.rb +62 -13
- data/lib/active_record/define_callbacks.rb +20 -0
- data/lib/active_record/dynamic_matchers.rb +80 -79
- data/lib/active_record/enum.rb +8 -6
- data/lib/active_record/errors.rb +58 -15
- data/lib/active_record/explain.rb +1 -2
- data/lib/active_record/explain_registry.rb +1 -1
- data/lib/active_record/explain_subscriber.rb +7 -4
- data/lib/active_record/fixture_set/file.rb +11 -8
- data/lib/active_record/fixtures.rb +66 -53
- data/lib/active_record/gem_version.rb +3 -3
- data/lib/active_record/inheritance.rb +93 -79
- data/lib/active_record/integration.rb +7 -7
- data/lib/active_record/internal_metadata.rb +3 -16
- data/lib/active_record/legacy_yaml_adapter.rb +1 -1
- data/lib/active_record/locking/optimistic.rb +64 -56
- data/lib/active_record/locking/pessimistic.rb +10 -1
- data/lib/active_record/log_subscriber.rb +29 -29
- data/lib/active_record/migration.rb +155 -172
- data/lib/active_record/migration/command_recorder.rb +94 -94
- data/lib/active_record/migration/compatibility.rb +76 -37
- data/lib/active_record/migration/join_table.rb +6 -6
- data/lib/active_record/model_schema.rb +85 -119
- data/lib/active_record/nested_attributes.rb +200 -199
- data/lib/active_record/null_relation.rb +10 -33
- data/lib/active_record/persistence.rb +45 -38
- data/lib/active_record/query_cache.rb +4 -8
- data/lib/active_record/querying.rb +2 -3
- data/lib/active_record/railtie.rb +16 -17
- data/lib/active_record/railties/controller_runtime.rb +6 -2
- data/lib/active_record/railties/databases.rake +125 -140
- data/lib/active_record/railties/jdbcmysql_error.rb +1 -1
- data/lib/active_record/readonly_attributes.rb +2 -2
- data/lib/active_record/reflection.rb +79 -96
- data/lib/active_record/relation.rb +72 -115
- data/lib/active_record/relation/batches.rb +87 -58
- data/lib/active_record/relation/batches/batch_enumerator.rb +1 -1
- data/lib/active_record/relation/calculations.rb +154 -160
- data/lib/active_record/relation/delegation.rb +30 -29
- data/lib/active_record/relation/finder_methods.rb +195 -226
- data/lib/active_record/relation/merger.rb +58 -62
- data/lib/active_record/relation/predicate_builder.rb +92 -89
- data/lib/active_record/relation/predicate_builder/array_handler.rb +7 -5
- data/lib/active_record/relation/predicate_builder/association_query_handler.rb +23 -23
- data/lib/active_record/relation/predicate_builder/base_handler.rb +3 -1
- data/lib/active_record/relation/predicate_builder/basic_object_handler.rb +0 -8
- data/lib/active_record/relation/predicate_builder/polymorphic_array_handler.rb +12 -10
- data/lib/active_record/relation/predicate_builder/range_handler.rb +0 -8
- data/lib/active_record/relation/query_attribute.rb +1 -1
- data/lib/active_record/relation/query_methods.rb +247 -295
- data/lib/active_record/relation/record_fetch_warning.rb +3 -3
- data/lib/active_record/relation/spawn_methods.rb +4 -5
- data/lib/active_record/relation/where_clause.rb +79 -65
- data/lib/active_record/relation/where_clause_factory.rb +47 -8
- data/lib/active_record/result.rb +29 -31
- data/lib/active_record/runtime_registry.rb +3 -3
- data/lib/active_record/sanitization.rb +182 -197
- data/lib/active_record/schema.rb +3 -3
- data/lib/active_record/schema_dumper.rb +14 -37
- data/lib/active_record/schema_migration.rb +3 -3
- data/lib/active_record/scoping.rb +9 -10
- data/lib/active_record/scoping/default.rb +87 -91
- data/lib/active_record/scoping/named.rb +16 -28
- data/lib/active_record/secure_token.rb +2 -2
- data/lib/active_record/statement_cache.rb +13 -15
- data/lib/active_record/store.rb +31 -32
- data/lib/active_record/suppressor.rb +2 -1
- data/lib/active_record/table_metadata.rb +9 -5
- data/lib/active_record/tasks/database_tasks.rb +72 -65
- data/lib/active_record/tasks/mysql_database_tasks.rb +75 -72
- data/lib/active_record/tasks/postgresql_database_tasks.rb +53 -48
- data/lib/active_record/tasks/sqlite_database_tasks.rb +18 -16
- data/lib/active_record/timestamp.rb +39 -25
- data/lib/active_record/touch_later.rb +1 -2
- data/lib/active_record/transactions.rb +98 -110
- data/lib/active_record/type.rb +17 -13
- data/lib/active_record/type/adapter_specific_registry.rb +46 -42
- data/lib/active_record/type/decimal_without_scale.rb +9 -0
- data/lib/active_record/type/hash_lookup_type_map.rb +3 -3
- data/lib/active_record/type/serialized.rb +8 -8
- data/lib/active_record/type/text.rb +9 -0
- data/lib/active_record/type/time.rb +0 -1
- data/lib/active_record/type/type_map.rb +11 -15
- data/lib/active_record/type/unsigned_integer.rb +15 -0
- data/lib/active_record/type_caster.rb +2 -2
- data/lib/active_record/type_caster/connection.rb +8 -6
- data/lib/active_record/type_caster/map.rb +3 -1
- data/lib/active_record/validations.rb +4 -4
- data/lib/active_record/validations/associated.rb +1 -1
- data/lib/active_record/validations/presence.rb +2 -2
- data/lib/active_record/validations/uniqueness.rb +8 -39
- data/lib/active_record/version.rb +1 -1
- data/lib/rails/generators/active_record.rb +4 -4
- data/lib/rails/generators/active_record/migration.rb +2 -2
- data/lib/rails/generators/active_record/migration/migration_generator.rb +37 -34
- data/lib/rails/generators/active_record/model/model_generator.rb +9 -9
- metadata +22 -13
- data/lib/active_record/relation/predicate_builder/class_handler.rb +0 -27
@@ -1,9 +1,9 @@
|
|
1
|
-
require
|
1
|
+
require "rails/generators/active_record"
|
2
2
|
|
3
3
|
module ActiveRecord
|
4
4
|
module Generators # :nodoc:
|
5
5
|
class ModelGenerator < Base # :nodoc:
|
6
|
-
argument :attributes, :
|
6
|
+
argument :attributes, type: :array, default: [], banner: "field[:type][:index] field[:type][:index]"
|
7
7
|
|
8
8
|
check_class_collision
|
9
9
|
|
@@ -22,18 +22,18 @@ module ActiveRecord
|
|
22
22
|
|
23
23
|
def create_model_file
|
24
24
|
generate_application_record
|
25
|
-
template
|
25
|
+
template "model.rb", File.join("app/models", class_path, "#{file_name}.rb")
|
26
26
|
end
|
27
27
|
|
28
28
|
def create_module_file
|
29
29
|
return if regular_class_path.empty?
|
30
30
|
generate_application_record
|
31
|
-
template
|
31
|
+
template "module.rb", File.join("app/models", "#{class_path.join('/')}.rb") if behavior == :invoke
|
32
32
|
end
|
33
33
|
|
34
34
|
hook_for :test_framework
|
35
35
|
|
36
|
-
|
36
|
+
private
|
37
37
|
|
38
38
|
def attributes_with_index
|
39
39
|
attributes.select { |a| !a.reference? && a.has_index? }
|
@@ -41,14 +41,14 @@ module ActiveRecord
|
|
41
41
|
|
42
42
|
# FIXME: Change this file to a symlink once RubyGems 2.5.0 is required.
|
43
43
|
def generate_application_record
|
44
|
-
if
|
45
|
-
template
|
44
|
+
if behavior == :invoke && !application_record_exist?
|
45
|
+
template "application_record.rb", application_record_file_name
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
49
|
# Used by the migration template to determine the parent name of the model
|
50
50
|
def parent_class_name
|
51
|
-
options[:parent] ||
|
51
|
+
options[:parent] || "ApplicationRecord"
|
52
52
|
end
|
53
53
|
|
54
54
|
def application_record_exist?
|
@@ -61,7 +61,7 @@ module ActiveRecord
|
|
61
61
|
@application_record_file_name ||= if mountable_engine?
|
62
62
|
"app/models/#{namespaced_path}/application_record.rb"
|
63
63
|
else
|
64
|
-
|
64
|
+
"app/models/application_record.rb"
|
65
65
|
end
|
66
66
|
end
|
67
67
|
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: 5.0.
|
4
|
+
version: 5.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: 2017-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.
|
19
|
+
version: 5.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: 5.0.
|
26
|
+
version: 5.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: 5.0.
|
33
|
+
version: 5.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: 5.0.
|
40
|
+
version: 5.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: '8.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: '
|
54
|
+
version: '8.0'
|
55
55
|
description: Databases on Rails. Build a persistent domain model by mapping database
|
56
56
|
tables to Ruby classes. Strong conventions for associations, validations, aggregations,
|
57
57
|
migrations, and testing come baked-in.
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/active_record/attribute_mutation_tracker.rb
|
122
122
|
- lib/active_record/attribute_set.rb
|
123
123
|
- lib/active_record/attribute_set/builder.rb
|
124
|
+
- lib/active_record/attribute_set/yaml_encoder.rb
|
124
125
|
- lib/active_record/attributes.rb
|
125
126
|
- lib/active_record/autosave_association.rb
|
126
127
|
- lib/active_record/base.rb
|
@@ -169,9 +170,10 @@ files:
|
|
169
170
|
- lib/active_record/connection_adapters/postgresql/oid/inet.rb
|
170
171
|
- lib/active_record/connection_adapters/postgresql/oid/json.rb
|
171
172
|
- lib/active_record/connection_adapters/postgresql/oid/jsonb.rb
|
173
|
+
- lib/active_record/connection_adapters/postgresql/oid/legacy_point.rb
|
172
174
|
- lib/active_record/connection_adapters/postgresql/oid/money.rb
|
175
|
+
- lib/active_record/connection_adapters/postgresql/oid/oid.rb
|
173
176
|
- lib/active_record/connection_adapters/postgresql/oid/point.rb
|
174
|
-
- lib/active_record/connection_adapters/postgresql/oid/rails_5_1_point.rb
|
175
177
|
- lib/active_record/connection_adapters/postgresql/oid/range.rb
|
176
178
|
- lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb
|
177
179
|
- lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb
|
@@ -180,6 +182,7 @@ files:
|
|
180
182
|
- lib/active_record/connection_adapters/postgresql/oid/xml.rb
|
181
183
|
- lib/active_record/connection_adapters/postgresql/quoting.rb
|
182
184
|
- lib/active_record/connection_adapters/postgresql/referential_integrity.rb
|
185
|
+
- lib/active_record/connection_adapters/postgresql/schema_creation.rb
|
183
186
|
- lib/active_record/connection_adapters/postgresql/schema_definitions.rb
|
184
187
|
- lib/active_record/connection_adapters/postgresql/schema_dumper.rb
|
185
188
|
- lib/active_record/connection_adapters/postgresql/schema_statements.rb
|
@@ -191,11 +194,14 @@ files:
|
|
191
194
|
- lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
|
192
195
|
- lib/active_record/connection_adapters/sqlite3/quoting.rb
|
193
196
|
- lib/active_record/connection_adapters/sqlite3/schema_creation.rb
|
197
|
+
- lib/active_record/connection_adapters/sqlite3/schema_definitions.rb
|
198
|
+
- lib/active_record/connection_adapters/sqlite3/schema_dumper.rb
|
194
199
|
- lib/active_record/connection_adapters/sqlite3_adapter.rb
|
195
200
|
- lib/active_record/connection_adapters/statement_pool.rb
|
196
201
|
- lib/active_record/connection_handling.rb
|
197
202
|
- lib/active_record/core.rb
|
198
203
|
- lib/active_record/counter_cache.rb
|
204
|
+
- lib/active_record/define_callbacks.rb
|
199
205
|
- lib/active_record/dynamic_matchers.rb
|
200
206
|
- lib/active_record/enum.rb
|
201
207
|
- lib/active_record/errors.rb
|
@@ -244,7 +250,6 @@ files:
|
|
244
250
|
- lib/active_record/relation/predicate_builder/association_query_handler.rb
|
245
251
|
- lib/active_record/relation/predicate_builder/base_handler.rb
|
246
252
|
- lib/active_record/relation/predicate_builder/basic_object_handler.rb
|
247
|
-
- lib/active_record/relation/predicate_builder/class_handler.rb
|
248
253
|
- lib/active_record/relation/predicate_builder/polymorphic_array_handler.rb
|
249
254
|
- lib/active_record/relation/predicate_builder/range_handler.rb
|
250
255
|
- lib/active_record/relation/predicate_builder/relation_handler.rb
|
@@ -281,12 +286,15 @@ files:
|
|
281
286
|
- lib/active_record/type/adapter_specific_registry.rb
|
282
287
|
- lib/active_record/type/date.rb
|
283
288
|
- lib/active_record/type/date_time.rb
|
289
|
+
- lib/active_record/type/decimal_without_scale.rb
|
284
290
|
- lib/active_record/type/hash_lookup_type_map.rb
|
285
291
|
- lib/active_record/type/internal/abstract_json.rb
|
286
292
|
- lib/active_record/type/internal/timezone.rb
|
287
293
|
- lib/active_record/type/serialized.rb
|
294
|
+
- lib/active_record/type/text.rb
|
288
295
|
- lib/active_record/type/time.rb
|
289
296
|
- lib/active_record/type/type_map.rb
|
297
|
+
- lib/active_record/type/unsigned_integer.rb
|
290
298
|
- lib/active_record/type_caster.rb
|
291
299
|
- lib/active_record/type_caster/connection.rb
|
292
300
|
- lib/active_record/type_caster/map.rb
|
@@ -323,11 +331,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
323
331
|
version: 2.2.2
|
324
332
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
325
333
|
requirements:
|
326
|
-
- - "
|
334
|
+
- - ">"
|
327
335
|
- !ruby/object:Gem::Version
|
328
|
-
version:
|
336
|
+
version: 1.3.1
|
329
337
|
requirements: []
|
330
|
-
|
338
|
+
rubyforge_project:
|
339
|
+
rubygems_version: 2.6.10
|
331
340
|
signing_key:
|
332
341
|
specification_version: 4
|
333
342
|
summary: Object-relational mapper framework (part of Rails).
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module ActiveRecord
|
2
|
-
class PredicateBuilder
|
3
|
-
class ClassHandler # :nodoc:
|
4
|
-
def initialize(predicate_builder)
|
5
|
-
@predicate_builder = predicate_builder
|
6
|
-
end
|
7
|
-
|
8
|
-
def call(attribute, value)
|
9
|
-
print_deprecation_warning
|
10
|
-
predicate_builder.build(attribute, value.name)
|
11
|
-
end
|
12
|
-
|
13
|
-
protected
|
14
|
-
|
15
|
-
attr_reader :predicate_builder
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def print_deprecation_warning
|
20
|
-
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
21
|
-
Passing a class as a value in an Active Record query is deprecated and
|
22
|
-
will be removed. Pass a string instead.
|
23
|
-
MSG
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|