ActionController::Routing::DynamicSegment
The OptionalFormatSegment allows for any resource route to have an optional :format, which decreases the amount of routes created by 50%.
# File lib/action_controller/routing/segments.rb, line 328 def extract_value "#{local_name} = options[:#{key}] && options[:#{key}].to_s.downcase" end
# File lib/action_controller/routing/segments.rb, line 316 def interpolation_chunk "." + super end
the value should not include the period (.)
# File lib/action_controller/routing/segments.rb, line 333 def match_extraction(next_capture) %[ if (m = match[#{next_capture}]) params[:#{key}] = URI.unescape(m.from(1)) end ] end
Generated with the Darkfish Rdoc Generator 2.