Produce a condition expression that will check the requirements of this route upon generation.
Source Code
# File action_controller/routing/route.rb, line 62 def generation_requirements requirement_conditions = requirements.collect do |key, req| if req.is_a? Regexp value_regexp = Regexp.new "\\A#{req.source}\\Z" "hash[:#{key}] && #{value_regexp.inspect} =~ options[:#{key}]" else "hash[:#{key}] == #{req.inspect}" end end requirement_conditions * ' && ' unless requirement_conditions.empty? end
<code/>and<pre/>for code samples.