Sha256: 5e85158b89bb549544425ffbeeeddd14fa8ca453177b66f75fd8a6a627658051

Contents?: true

Size: 516 Bytes

Versions: 5

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

require 'rails_compatibility'
require 'rails_compatibility/active_record'

class << RailsCompatibility
  if GTE_RAILS_6_1
    def has_include?(relation, column_name)
      relation.send(:has_include?, column_name)
    end
  elsif GTE_RAILS_5_0
    def has_include?(relation, column_name)
      relation.dup.send(:has_include?, column_name)
    end
  else
    def has_include?(relation, column_name)
      relation.send(:has_include?, column_name)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_compatibility-0.0.10 lib/rails_compatibility/has_include.rb
rails_compatibility-0.0.9 lib/rails_compatibility/has_include.rb
rails_compatibility-0.0.8 lib/rails_compatibility/has_include.rb
rails_compatibility-0.0.7 lib/rails_compatibility/has_include.rb
rails_compatibility-0.0.6 lib/rails_compatibility/has_include.rb