method
unoptionalize
unoptionalize(pattern)
public
Hide source
# File actionpack/lib/action_controller/routing/routing_ext.rb, line 42 def unoptionalize(pattern) [/\A\(\?:(.*)\)\?\Z/, /\A(.|\(.*\))\?\Z/].each do |regexp| return $1 if regexp =~ pattern end return pattern end