There's no documentation for this item.
Source Code
# File action_controller/routing/segments.rb, line 83 def build_pattern(pattern) escaped = Regexp.escape(value) if optional? && ! pattern.empty? "(?:#{Regexp.optionalize escaped}\\Z|#{escaped}#{Regexp.unoptionalize pattern})" elsif optional? Regexp.optionalize escaped else escaped + pattern end end
<code/>and<pre/>for code samples.