Flowdock
method

apply_limits

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: ActiveRecord::Batches
apply_limits(relation, start, finish) 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/batches.rb, line 261
      def apply_limits(relation, start, finish)
        if start
          attr = Relation::QueryAttribute.new(primary_key, start, klass.type_for_attribute(primary_key))
          relation = relation.where(arel_attribute(primary_key).gteq(Arel::Nodes::BindParam.new(attr)))
        end
        if finish
          attr = Relation::QueryAttribute.new(primary_key, finish, klass.type_for_attribute(primary_key))
          relation = relation.where(arel_attribute(primary_key).lteq(Arel::Nodes::BindParam.new(attr)))
        end
        relation
      end
Register or log in to add new notes.