Sha256: b907710e8a61611282173da819f113e7c41e173889c653db4d3f3b6e32b43dd6

Contents?: true

Size: 647 Bytes

Versions: 12

Compression:

Stored size: 647 Bytes

Contents

module PolyamorousHelper
  def new_join_association(reflection, children, klass)
    Polyamorous::JoinAssociation.new reflection, children, klass
  end

  if ActiveRecord.version >= ::Gem::Version.new("6.0.0.rc1")
    def new_join_dependency(klass, associations = {})
      Polyamorous::JoinDependency.new klass, klass.arel_table, associations, Polyamorous::InnerJoin
    end
  else
    def new_join_dependency(klass, associations = {})
      Polyamorous::JoinDependency.new klass, klass.arel_table, associations
    end
  end

  def new_join(name, type = Polyamorous::InnerJoin, klass = nil)
    Polyamorous::Join.new name, type, klass
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
ransack-3.1.0 spec/helpers/polyamorous_helper.rb
ransack-3.0.1 spec/helpers/polyamorous_helper.rb
ransack-3.0.0 spec/helpers/polyamorous_helper.rb
ransack-2.6.0 spec/helpers/polyamorous_helper.rb
ransack-2.5.0 spec/helpers/polyamorous_helper.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/ransack-2.4.2/spec/helpers/polyamorous_helper.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/ransack-2.4.2/spec/helpers/polyamorous_helper.rb
ransack-2.4.2 spec/helpers/polyamorous_helper.rb
ransack-2.4.1 spec/helpers/polyamorous_helper.rb
ransack-2.4.0 spec/helpers/polyamorous_helper.rb
ransack-2.3.2 spec/helpers/polyamorous_helper.rb
ransack-2.3.1 spec/helpers/polyamorous_helper.rb