Flowdock
method

limited_ids_for

Importance_0
v5.0.0.1 - 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 427
    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!
      arel = relation.arel

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