File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,11 @@ def inherited(base)
152
152
@attributes_builder = nil
153
153
end
154
154
end
155
+
156
+ def load_schema! # :nodoc:
157
+ super
158
+ alias_attribute :id_value , :id if @columns_hash . key? ( "id" )
159
+ end
155
160
end
156
161
end
157
162
end
Original file line number Diff line number Diff line change @@ -583,7 +583,6 @@ def load_schema!
583
583
columns_hash = connection . schema_cache . columns_hash ( table_name )
584
584
columns_hash = columns_hash . except ( *ignored_columns ) unless ignored_columns . empty?
585
585
@columns_hash = columns_hash . freeze
586
- alias_attribute :id_value , :id if @columns_hash . key? ( "id" )
587
586
end
588
587
589
588
# Guesses the table name, but does not decorate it with prefix and suffix information.
You can’t perform that action at this time.
0 commit comments