lib/ransack/adapters/active_record/context.rb
# Because the AR::Associations namespace is insane
Because the AR::Associations namespace is insane
Because the AR :: Associations namespace is insane
def evaluate(search, opts = {})
          viz = Visitor.new
          relation = @object.where(viz.accept(search.base))
          if search.sorts.any?
            relation = relation.except(:order).reorder(viz.accept(search.sorts))
          end
          opts[:distinct] ? relation.distinct : relation
        end
def evaluate ( search , opts = { } ) viz = Visitor . new relation = @object . where ( viz . accept ( search . base ) ) if search . sorts . any? relation = relation . except ( :order ) . reorder ( viz . accept ( search . sorts ) ) end opts [ :distinct ] ? relation . distinct : relation end
Because the AR::Associations namespace is insane
Because the AR :: Associations namespace is insane
search
opts