Skip to content

Commit

Permalink
Fix Rubocop error about #install_hooks method length
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorthurlow authored and DmitryTsepelev committed Mar 10, 2023
1 parent b28dea5 commit 6fdcf76
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/ar_lazy_preload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ def install_hooks
ActiveRecord::AssociationRelation.prepend(AssociationRelation)
ActiveRecord::Relation::Merger.prepend(Merger)

[
ActiveRecord::Associations::CollectionAssociation,
ActiveRecord::Associations::Association
].each { |klass| klass.prepend(Association) }
ActiveRecord::Associations::CollectionAssociation.prepend(Association)
ActiveRecord::Associations::Association.prepend(Association)

ActiveRecord::Associations::CollectionAssociation.prepend(CollectionAssociation)
ActiveRecord::Associations::CollectionProxy.prepend(CollectionProxy)
Expand Down

0 comments on commit 6fdcf76

Please sign in to comment.