We have Clearance, Clarence

Post by: on February 20, 2011 | 0 Comment

So, I’ve spent the last few hours mucking with the Clearance based authentication system I’m using. I’m trying to get it to reset passwords correctly. I haven’t gotten that working yet, but I have cleaned up a bunch of stuff related to new accounts and logging in, so it’s been worth it.

I’ve basically subclassed all the Clearance classes, mostly so that I can define a layout for the pages, but there are a few cases where I’ve overridden the functionality.

The trickiest part is figuring out all the routes. Clearance installs a bunch of routes, and they’re not always obvious. Fortunately there’s:

rake routes

To list everything that’s defined, even if it’s deep down in a gem.

The Clearance guys were nice enough to link to the relevant video on their readme page.