Sha256: 5d01533d93d066f9ff765cd34e7508f33f610163a672c55148ed5fee1db20619

Contents?: true

Size: 713 Bytes

Versions: 7

Compression:

Stored size: 713 Bytes

Contents

# encoding: UTF-8

require 'active_record'

begin
  ar_version = if ActiveRecord::VERSION.const_defined?(:STRING)
    ActiveRecord::VERSION::STRING
  else
    ActiveRecord.version.version
  end

  if ar_version >= '4.0.0'
    require 'arel-helpers/ext/collection_proxy'
  end
rescue
  puts 'ArelHelpers was unable to determine the version of ActiveRecord. You may encounter unexpected behavior.'
end

module ArelHelpers
  autoload :JoinAssociation, "arel-helpers/join_association"
  autoload :ArelTable,       "arel-helpers/arel_table"
  autoload :QueryBuilder,    "arel-helpers/query_builder"

  def self.join_association(*args, &block)
    ArelHelpers::JoinAssociation.join_association(*args, &block)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arel-helpers-2.5.0 lib/arel-helpers.rb
arel-helpers-2.4.0 lib/arel-helpers.rb
arel-helpers-2.3.0 lib/arel-helpers.rb
arel-helpers-2.2.0 lib/arel-helpers.rb
arel-helpers-2.1.1 lib/arel-helpers.rb
arel-helpers-2.1.0 lib/arel-helpers.rb
arel-helpers-2.0.2 lib/arel-helpers.rb