method

verify_regexp_requirements

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: ActionDispatch::Routing::Mapper::Mapping
verify_regexp_requirements(requirements) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 278
          def verify_regexp_requirements(requirements)
            requirements.each do |requirement|
              if requirement.source =~ ANCHOR_CHARACTERS_REGEX
                raise ArgumentError, "Regexp anchor characters are not allowed in routing requirements: #{requirement.inspect}"
              end

              if requirement.multiline?
                raise ArgumentError, "Regexp multiline option is not allowed in routing requirements: #{requirement.inspect}"
              end
            end
          end
Register or log in to add new notes.