instance method ensure_in_range

Ruby on Rails 7.1.6

Since v7.1.6 Last seen in v8.0.4 Private — implementation detail, not part of the public API

Available in: v7.1.6 v7.2.3 v8.0.4

Signature

ensure_in_range(value)

No documentation comment.

Parameters

value req
Source
# File activemodel/lib/active_model/type/integer.rb, line 93
        def ensure_in_range(value)
          unless in_range?(value)
            raise ActiveModel::RangeError, "#{value} is out of range for #{self.class} with limit #{_limit} bytes"
          end
          value
        end

Defined in activemodel/lib/active_model/type/integer.rb line 93 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Type::Integer

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close