skwpspace yan pritzker’s home on the web

skwpspace is Yan Pritzker's home on the web

Blog :: Photography :: About Me

TwitterCounter for @skwp

Get the news feed
Get updates by email
Follow me on twitter

hello, i'm yan

This blog is about startups, blogging, Ruby On Rails, virtualization and cloud computing, photography, customer service, marketing, ux and design, git, and lots more.

Top Posts

planypus

I'm the founder of Planypus, the place to share your plans!

cohesiveft

Accessible, manageable, virtualized application stacks ready to download or deploy to the cloud!

flickr

smokingThe old man and the accordionBicycle 6x6Eva 6x6Shaffies 6x6Phone Booth Velvia 6x6WynnStar 6x6

Archives

Contact

Reach me at yan at pritzker.ws

Posted
27 February 2007 @ 5am

Tagged
RubyOnRails

Rails 1.2 breaks url routing with dots?

This last week we’ve spent migrating Planypus from Rails 1.1.6 to the latest 1.2.1 release. Unfortunately the Rails 1.2 rewrite of the routing system leaves something to be desired. Apparently, the dot “.” (period) character is now considered a route separator, causing routes that have dots in them to break badly. Why is this bad? Well let’s say you were routing based on numbers, like lat/long coordinates..oops! Broken! Or, let’s say you were displaying users by their email (gmail has a prevalence of dots). Broken! I still love Rails, don’t get me wrong, but shouldn’t this sort of breakage be advertised just a little more loudly? Well here I am, yelling :-)


5 Comments

Posted by
Ryan B.
27 February 2007 @ 6pm

I believe this can be fixed with the “:require” parameter. See this post for details:

http://forum.textdrive.com/viewtopic.php?pid=116742


Posted by
Yan
27 February 2007 @ 9pm

Thanks! That fixed it right up :-). For those too lazy to click through, the trick is to add a :requirements => {:yourparam => /.*/} to make it recognize dots in yourparam.


Posted by
Balance On Rails : Pacotão Pós-Carnaval
6 March 2007 @ 1pm

[...] Sobre Rails 1.2, é bom saber que o esquema de carga de plugins mudou, para melhor, como já falamos em outros posts, mas aqui estão os detalhes. Outra dica para quem está atualizando é tomar cuidado com pontos em rotas. [...]


Posted by
ditoinfo in english
22 May 2007 @ 5pm

Rails 1.2 routes and the dot “.”…

Rails 1.2 came with great new features. One of them was the REST able applications. Other was the ability to serve results based on how the request was made. So you could send different results for controller/action.html, controller/action.xml or conto…


[...] 4. (Not related to fixtures at all) In Rails, “.” in a (URL) path is a “route separator“, so it doesn’t behave like you expect by default. The fix is to add something like: [...]


Leave a Comment

NetNewsWire is now my rss reader of choice Two critical patches for Rails 1.2.2