Missing backslashes in route RegEx #39

Closed
jaredcwhite opened this Issue Mar 8, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@jaredcwhite

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

@jeffschuil

This comment has been minimized.

Show comment
Hide comment
@jeffschuil

jeffschuil Mar 8, 2011

Member

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

Member

jeffschuil commented Mar 8, 2011

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

@jaredcwhite

This comment has been minimized.

Show comment
Hide comment
@jaredcwhite

jaredcwhite Mar 9, 2011

Awesome! Glad to see it get updated so quickly!

Awesome! Glad to see it get updated so quickly!

@jeffschuil

This comment has been minimized.

Show comment
Hide comment
@jeffschuil

jeffschuil Mar 9, 2011

Member

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

Member

jeffschuil commented Mar 9, 2011

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

nickhammond pushed a commit to nickhammond/event_calendar that referenced this issue Apr 27, 2011

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment