Monday, June 27, 2011

Session Counter in Rails

Since I've been working through Agile Web Development with Rails, I've felt less like blogging about what I'm doing. It's not that I don't find this book valuable, but I'm less excited about talking about my progress than when I'm working on a personal project. Still, I haven't been slacking in my coding.

I've had a lot of luck translating things I'm learning into methods that work with my other projects (mostly just Chorenivore) and this time through Agile Web Development, I'm doing all the extra stuff. Tonight I learned a method for displaying how many times a user has viewed the index page, as well as a way to reset the session counter and how to change how often it's displayed.

I'm guessing this is the same sort of thing that's used to track how often things are viewed online, right? With some editing, this method could be used on a photo blog to show how many views a particular photo has had, etc. You see how things are coming together?

I've also been using github extensively, mostly just to record what I've done and as a means of source control. Much like firing up the terminal and booting up webrick, I no longer have to think about how to commit changes and push to git. Memorization isn't learning, but it can definitely make learning easier.

1 comment: