Polymathic

Digital transformation, higher education, innovation, technology, professional skills, management, and strategy


Place Custom Rails Routes First

This is another one that should have been obvious. But, I was getting it wrong. Maybe it had something to do with upgrading to Rails 1.2.6.

Anyway, I was getting an error with a custom action. I was sending a form to “projects/do_something”. But, I kept getting the error of “Can’t find project with ID=do_something”.

This was happening because Rails thought it was supposed to be looking in the route for the show action. But, checking the routes file, I could see that I had defined my custom route. What, what was up?

It turns out, the custom route has to come before the standard “map.resources :projects” line.

Once I fixed that, all is well again. (I still think this acted differently in 1.2.3. Hmm).



Leave a Reply

Your email address will not be published. Required fields are marked *

About Me

Digital transformation, including agile and devops, across many industries, most recently in higher education. Designed and built the Emory faculty information system. Working in continuing education to improve and expand career-focused learning, esp. in workforce development. Expanding the role of innovation and entrepreneurship. Designed, built, and launched the Emory Center for Innovation.

Favorite sites

  • Daring Fireball

Favorite podcasts

  • Manager Tools

Newsletter

Newsletter


Discover more from Polymathic

Subscribe now to keep reading and get access to the full archive.

Continue reading