Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Jul 10, 2023
1 parent 63dc7f7 commit 5b10499
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/frozen_record/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ def respond_to_missing?(name, *)
end

def eager_load!
return if auto_reloading || abstract_class?
if auto_reloading || abstract_class?
p [name, auto_reloading, abstract_class?]
return
end

load_records
end
Expand All @@ -208,6 +211,7 @@ def load_records(force: false)
define_attribute_methods(@attributes.to_a)
records = FrozenRecord.ignore_max_records_scan { records.map { |r| load(r) }.freeze }
index_definitions.values.each { |index| index.build(records) }
p [name, records.size]
records
end
end
Expand Down

0 comments on commit 5b10499

Please sign in to comment.