From d4a0fa6158c128c5a64204ee0fd2ee6493bd5a66 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 18 Aug 2018 17:20:54 +0900 Subject: [PATCH] Remove unused constant aliases for `Arel::{InnerJoin,OuterJoin}` `Arel::Nodes::{InnerJoin,OuterJoin}` exists since Arel 2.2 still today. https://github.com/rails/arel/blame/v9.0.0/lib/arel/nodes/inner_join.rb https://github.com/rails/arel/blame/v9.0.0/lib/arel/nodes/outer_join.rb --- lib/polyamorous.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/polyamorous.rb b/lib/polyamorous.rb index 8eedfa4..5a1ac05 100644 --- a/lib/polyamorous.rb +++ b/lib/polyamorous.rb @@ -1,12 +1,7 @@ if defined?(::ActiveRecord) module Polyamorous - if defined?(Arel::InnerJoin) - InnerJoin = Arel::InnerJoin - OuterJoin = Arel::OuterJoin - else - InnerJoin = Arel::Nodes::InnerJoin - OuterJoin = Arel::Nodes::OuterJoin - end + InnerJoin = Arel::Nodes::InnerJoin + OuterJoin = Arel::Nodes::OuterJoin JoinDependency = ::ActiveRecord::Associations::JoinDependency JoinAssociation = ::ActiveRecord::Associations::JoinDependency::JoinAssociation