Flowdock
method

limited_ids_for

Importance_0
v4.1.8 - Show latest stable - 0 notes - Class: ActiveRecord::FinderMethods
limited_ids_for(relation) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 385
    def limited_ids_for(relation)
      values = @klass.connection.columns_for_distinct(
        "#{quoted_table_name}.#{quoted_primary_key}", relation.order_values)

      relation = relation.except(:select).select(values).distinct!

      id_rows = @klass.connection.select_all(relation.arel, 'SQL', relation.bind_values)
      id_rows.map {|row| row[primary_key]}
    end
Register or log in to add new notes.