diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-17 10:41:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 10:41:35 -0400 |
commit | 8e06f09875d7c935c69f137c3b992a35b782daa0 (patch) | |
tree | c46ac9741717f44567347accbb24f4fe7539e2c4 /activerecord/lib/active_record | |
parent | 5c71000d086cc42516934415b79380c2224e1614 (diff) | |
parent | a0ebab52b2a708a09739e0c4ecc16ad16d4e676d (diff) | |
download | rails-8e06f09875d7c935c69f137c3b992a35b782daa0.tar.gz rails-8e06f09875d7c935c69f137c3b992a35b782daa0.tar.bz2 rails-8e06f09875d7c935c69f137c3b992a35b782daa0.zip |
Merge pull request #29825 from kamipo/remove_useless_arel_engine
Remove useless `arel_engine`
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 10 | ||||
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 1 | ||||
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
3 files changed, 1 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 02d8cf82d2..3ea7b644c2 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -263,16 +263,6 @@ module ActiveRecord @arel_table ||= Arel::Table.new(table_name, type_caster: type_caster) end - # Returns the Arel engine. - def arel_engine # :nodoc: - @arel_engine ||= - if Base == self || connection_handler.retrieve_connection_pool(connection_specification_name) - self - else - superclass.arel_engine - end - end - def arel_attribute(name, table = arel_table) # :nodoc: name = attribute_alias(name) if attribute_alias?(name) table[name] diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 14e0f5bff7..2d3c9175bd 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -467,7 +467,6 @@ module ActiveRecord end def reload_schema_from_cache - @arel_engine = nil @arel_table = nil @column_names = nil @attribute_types = nil diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index ac0b4f597e..7121dcade8 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -329,7 +329,7 @@ module ActiveRecord # the expected number of results should be provided in the +expected_size+ # argument. def raise_record_not_found_exception!(ids = nil, result_size = nil, expected_size = nil, key = primary_key) # :nodoc: - conditions = arel.where_sql(@klass.arel_engine) + conditions = arel.where_sql(@klass) conditions = " [#{conditions}]" if conditions name = @klass.name |