Grails

Typo in regular expression for UrlMappings.groovy constraints example (6.4.8.)

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.0.3
  • Fix Version/s: 1.2 final
  • Component/s: Documentation
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

Just detected a minor typo in the ref guide

6.4.8 Applying Constraints

 
"/$blog/$year?/$month?/$day?/$id?" {
     controller = "blog"
     action = "show"
     constraints {
          year(matches:/d{4}/)
          month(matches:/d{2}/)
          day(matches:/d{2}/)
     }
}

Please escape the \d otherwise it will not be matched (ie. /\d{4}/.

Activity

Hide
Graeme Rocher added a comment -

Assigning all documentation related issues to 1.2 final since they don't represent a change to the codebase

Show
Graeme Rocher added a comment - Assigning all documentation related issues to 1.2 final since they don't represent a change to the codebase
Hide
Graeme Rocher added a comment -

seems to be already fixed

Show
Graeme Rocher added a comment - seems to be already fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: