class method self.add_limit!

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18 Private

Available in: v2.2.3 v2.3.18

Signature

self.add_limit!(sql, options, scope = :auto)

The optional scope argument is for the current :find scope.

Parameters

sql req
options req
scope opt = :auto
Source
# File activerecord/lib/active_record/base.rb, line 1795
        def add_limit!(sql, options, scope = :auto)
          scope = scope(:find) if :auto == scope

          if scope
            options[:limit] ||= scope[:limit]
            options[:offset] ||= scope[:offset]
          end

          connection.add_limit_offset!(sql, options)
        end

Defined in activerecord/lib/active_record/base.rb line 1795 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Base

Type at least 2 characters to search.

↑↓ navigate · open · esc close