Skip to content

Commit

Permalink
Simplify active record extension loading (#1445)
Browse files Browse the repository at this point in the history
  • Loading branch information
tvongaza authored Oct 24, 2023
1 parent 0f02ee6 commit fb6027d
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 10 deletions.
File renamed without changes.

This file was deleted.

1 change: 0 additions & 1 deletion lib/polyamorous/activerecord_7.0_ruby_2/join_dependency.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/polyamorous/activerecord_7.0_ruby_2/reflection.rb

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion lib/polyamorous/activerecord_7.1_ruby_2/join_dependency.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/polyamorous/activerecord_7.1_ruby_2/reflection.rb

This file was deleted.

7 changes: 3 additions & 4 deletions lib/polyamorous/polyamorous.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ module Polyamorous
require 'polyamorous/join'
require 'polyamorous/swapping_reflection_class'

ar_version = ::ActiveRecord::VERSION::STRING[0, 3]
%w(join_association join_dependency reflection).each do |file|
require "polyamorous/activerecord_#{ar_version}_ruby_2/#{file}"
end
require 'polyamorous/activerecord/join_association'
require 'polyamorous/activerecord/join_dependency'
require 'polyamorous/activerecord/reflection'

ActiveRecord::Reflection::AbstractReflection.send(:prepend, Polyamorous::ReflectionExtensions)

Expand Down

0 comments on commit fb6027d

Please sign in to comment.