Merge pull request #985 from gregmolnar/master

load 5.2.1 polyamorous files for >= 5.2.1
This commit is contained in:
Greg Molnar 2018-11-29 17:31:03 +01:00 committed by GitHub
commit 8daa87a038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,8 @@ if defined?(::ActiveRecord)
require 'polyamorous/swapping_reflection_class'
ar_version = ::ActiveRecord::VERSION::STRING[0,3]
ar_version = ::ActiveRecord::VERSION::STRING[0,5] if ar_version >= '5.2'
ar_version = ::ActiveRecord::VERSION::STRING[0,5] if ar_version >= "5.2"
ar_version = "5.2.1" if ::ActiveRecord::VERSION::STRING >= "5.2.1"
%w(join_association join_dependency).each do |file|
require "polyamorous/activerecord_#{ar_version}_ruby_2/#{file}"