Sha256: 2ccf13d0e794630800cb728290b05c58a06ecd595f05b555af39d817b0f46685

Contents?: true

Size: 618 Bytes

Versions: 8

Compression:

Stored size: 618 Bytes

Contents

module PolyamorousHelper
  if ActiveRecord::VERSION::STRING >= "4.1"
    def new_join_association(reflection, children, klass)
      Polyamorous::JoinAssociation.new reflection, children, klass
    end
  else
    def new_join_association(reflection, join_dependency, parent, klass)
      Polyamorous::JoinAssociation.new reflection, join_dependency, parent, klass
    end
  end

  def new_join_dependency(klass, associations = {})
    Polyamorous::JoinDependency.new klass, associations, []
  end

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

end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
polyamorous-1.3.1 spec/helpers/polyamorous_helper.rb
polyamorous-1.3.0 spec/helpers/polyamorous_helper.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/polyamorous-1.2.0/spec/helpers/polyamorous_helper.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/polyamorous-1.2.0/spec/helpers/polyamorous_helper.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/polyamorous-1.2.0/spec/helpers/polyamorous_helper.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/polyamorous-1.2.0/spec/helpers/polyamorous_helper.rb
polyamorous-1.2.0 spec/helpers/polyamorous_helper.rb
polyamorous-1.1.0 spec/helpers/polyamorous_helper.rb