Posts Tagged ‘routing’

Developer’s journal: devise, Rails 3, RSpec, and more

Friday, July 9th, 2010

I keep a text file open as I work, and when I learn something, or fix a bug, I make a note of that in the text file. I call it my journal. It’s pretty low-tech, but text search turns out to be a sufficient way to look up past experiences when I find myself thinking “this problem seems so familiar”. There’s another benefit too: I find keeping simple notes about what I’m doing—what problems I’m solving, what approaches I’m using, what’s working and what could work better—keeps me focused on my goals. It turns out learning a programming language or a web framework is not as hard as training your mind to solve programming challenges efficiently.

Here are some things from my journal: I’m working on a Rails 3 app right now, something I plan to flog and promote mercilessly in upcoming posts. I’ve encountered some mysteries for which there was no simple HOWTO information easily available via web search. I thought I’d share the answers I cobbled together:

  1. How to get RSpec and RSpec-Rails for Rails 3;
  2. How to make devise routing work with related nested routes;
  3. How to spec controllers that use devise to restrict access to logged-in users;
  4. How to get verify :method to work in Rails 3.

(more…)