From 320cd95fa342198a01db6b0a00cb4ea245f0a4aa Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Thu, 24 Sep 2015 13:27:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ransack/adapters/active_record/context.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ransack/adapters/active_record/context.rb b/lib/ransack/adapters/active_record/context.rb index 3531ec22f..c21580615 100644 --- a/lib/ransack/adapters/active_record/context.rb +++ b/lib/ransack/adapters/active_record/context.rb @@ -86,7 +86,7 @@ def join_associations "ActiveRecord 4.1 and later does not use join_associations. Use join_sources." end - # All dependent Arel::Join nodes used in the search query + # All dependent Arel::Join nodes used in the search query. # # This could otherwise be done as `@object.arel.join_sources`, except # that ActiveRecord's build_joins sets up its own JoinDependency. @@ -109,7 +109,7 @@ def join_sources else - # All dependent JoinAssociation items used in the search query + # All dependent JoinAssociation items used in the search query. # # Deprecated: this goes away in ActiveRecord 4.1. Use join_sources. # @@ -282,7 +282,7 @@ def build_or_find_association(name, parent = @base, klass = nil) :build, Polyamorous::Join.new(name, @join_type, klass), parent - ) + ) found_association = @join_dependency.join_associations.last # Leverage the stashed association functionality in AR @object = @object.joins(found_association)