Flowdock
method

find_some_ordered

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: ActiveRecord::FinderMethods
find_some_ordered(ids) 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 553
      def find_some_ordered(ids)
        ids = ids.slice(offset_value || 0, limit_value || ids.size) || []

        relation = except(:limit, :offset)
        relation = relation.where(primary_key => ids)
        relation = relation.select(table[primary_key]) unless select_values.empty?
        result = relation.records

        if result.size == ids.size
          result.in_order_of(:id, ids.map { |id| @klass.type_for_attribute(primary_key).cast(id) })
        else
          raise_record_not_found_exception!(ids, result.size, ids.size)
        end
      end
Register or log in to add new notes.