Sha256: f8cae00e623a58132b3ebaf6910558b74b8eaa662efba4ee62fd3d25d50a5478
Contents?: true
Size: 397 Bytes
Versions: 40
Compression:
Stored size: 397 Bytes
Contents
# frozen_string_literal: true require 'set' module Thredded # Excludes pagination routes in addition to the given list of reserved words. class FriendlyIdReservedWordsAndPagination PAGINATION_PATTERN = /\Apage-\d+\z/i def initialize(words = []) @words = Set.new(words) end def include?(slug) @words.include?(slug) || slug =~ PAGINATION_PATTERN end end end
Version data entries
40 entries across 40 versions & 2 rubygems