Skip to content

Commit 7754e32

Browse files
authored
Merge pull request #197 from kbrock/drop_load_schema
drop unnecessary load_schema statements
2 parents 1e883f1 + c0a87f8 commit 7754e32

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

lib/active_record/virtual_attributes.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def virtual_attribute(name, type, uses: nil, arel: nil, **options)
7272
#
7373

7474
def virtual_attribute?(name)
75-
load_schema
7675
has_attribute?(name) && (
7776
!respond_to?(:column_for_attribute) ||
7877
column_for_attribute(name).kind_of?(ActiveRecord::ConnectionAdapters::NullColumn)

lib/active_record/virtual_attributes/virtual_arel.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def arel_table
8383
# - it is an attribute that is non virtual
8484
# - it is an attribute that is virtual and has arel defined
8585
def attribute_supported_by_sql?(name)
86-
load_schema
8786
try(:attribute_alias?, name) ||
8887
(has_attribute?(name) && (!virtual_attribute?(name) || !!_virtual_arel[name.to_s]))
8988
end

lib/active_record/virtual_attributes/virtual_includes.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ module VirtualIncludes
1818

1919
module ClassMethods
2020
def virtual_includes(name)
21-
load_schema
2221
_virtual_includes[name.to_s]
2322
end
2423

0 commit comments

Comments
 (0)