Skip to content


Missing backslashes in route RegEx #39

jaredcwhite opened this Issue · 3 comments

2 participants


This is the Rails 2.x version. I was having problems with my routes after installing the plugin, and finally I tracked it down to missing backslashes in the requirements for the route. The generator created this:

map.calendar '/calendar/:year/:month', :controller => 'calendar', :action => 'index', :requirements => {:year => /d{4}/, :month => /d{1,2}/}, :year => nil, :month => nil

But it really should be this:

map.calendar '/calendar/:year/:month', :controller => 'calendar', :action => 'index', :requirements => {:year => /\d{4}/, :month => /\d{1,2}/}, :year => nil, :month => nil

Hope that helps! --Jared

Elevation member

Fix the route that's generated for Rails 2. Closed by 50389f7.


Awesome! Glad to see it get updated so quickly!

Elevation member

Yeah, it was a good catch. I'm kinda surprised someone hadn't brought this up sooner. Thanks for the help.

@nickhammond nickhammond pushed a commit to nickhammond/event_calendar that referenced this issue
@jeffschuil jeffschuil Fix the route that's generated for Rails 2. Closes #39. 50389f7
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.