Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source
Show
Ignore:
Timestamp:
03/28/08 20:01:21 (7 months ago)
Author:
david
Message:

Added support for regexp flags like ignoring case in the :requirements part of routes declarations (closes #11421) [NeilW]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/routing/route.rb

    r8652 r9115  
    6363        requirement_conditions = requirements.collect do |key, req| 
    6464          if req.is_a? Regexp 
    65             value_regexp = Regexp.new "\\A#{req.source}\\Z" 
     65            value_regexp = Regexp.new "\\A#{req.to_s}\\Z" 
    6666            "hash[:#{key}] && #{value_regexp.inspect} =~ options[:#{key}]" 
    6767          else