lib/randumb/relation.rb
def is_randumb_postges_case?(relation, ranking_column=nil)
        if relation.respond_to?(:uniq_value) && relation.uniq_value && connection.adapter_name =~ /(postgres|postgis)/i
          if ranking_column
            raise Exception, "order_by_rand_weighted: not possible when using .uniq and the postgres/postgis db adapter"
          else
            return true
          end
        end
      end
# postgres won't let you do an order_by when also doing a distinct
# let's just use the in-memory option in this case
postgres won't let you do an order_by when also doing a distinct
let's just use the in-memory option in this case
postgres won ' t let you do an order_by when also doing a distinct let ' s just use the in - memory option in this case
def is_randumb_postges_case?(relation, ranking_column=nil)
        if relation.respond_to?(:uniq_value) && relation.uniq_value && connection.adapter_name =~ /(postgres|postgis)/i
          if ranking_column
            raise Exception, "order_by_rand_weighted: not possible when using .uniq and the postgres/postgis db adapter"
          else
            return true
          end
        end
      end
def is_randumb_postges_case? ( relation , ranking_column = nil ) if relation . respond_to? ( :uniq_value ) && relation . uniq_value && connection . adapter_name =~ / (postgres|postgis) /i if ranking_column raise Exception , "order_by_rand_weighted: not possible when using .uniq and the postgres/postgis db adapter" else return true end end end
postgres won't let you do an order_by when also doing a distinct
let's just use the in-memory option in this case
postgres won ' t let you do an order_by when also doing a distinct let ' s just use the in - memory option in this case
relation
ranking_column