Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Dynamically set distinct option #109

Open
chrismhilton opened this Issue · 1 comment

2 participants

@chrismhilton

I would like to set the result :distinct option dynamically depending on whether or not my search requires a join.

Previously when using MetaSearch I was able to determine whether or not a join was required using the following:

@search.join_dependency.join_associations.empty?

Could you please advise how I could implement an equivalent check using Ransack.

@aripollak

It looks like distinct is automatically used when necessary now, at least under Rails 4.1. Maybe the explicit distinct option is no longer necessary for most cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.