mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-13 14:02:23 +00:00
11 lines
235 B
Ruby
11 lines
235 B
Ruby
|
# 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
|