method
sanitize_limit
Ruby on Rails latest stable (v7.1.3.2)
-
0 notes -
Class: ActiveRecord::ConnectionAdapters::DatabaseStatements
sanitize_limit(limit)
public
Sanitizes the given LIMIT parameter in order to prevent SQL injection.
The limit may be anything that can evaluate to a string via #to_s. It should look like an integer, or an Arel SQL literal.
Returns Integer and Arel::Nodes::SqlLiteral limits as is.