1
0
Fork 1
mirror of https://github.com/mastodon/mastodon.git synced 2025-01-25 14:59:20 +00:00
mastodon/app/models/concerns/inet_container.rb

11 lines
235 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module InetContainer
extend ActiveSupport::Concern
included do
scope :containing, ->(value) { where('ip >>= ?', value) }
scope :contained_by, ->(value) { where('ip <<= ?', value) }
end
end