Suggest:

    def batch_size
      (@scope.batch_size && @scope.batch_size > 0) ? @scope.batch_size : limit
    end