I spent the last day or two upgrading this site to run the latest and greatest Rails 2.0.2. Obviously, I didn’t want to upgrade without using what made me want to upgrade in the first place, so there I was, yet again, rewriting my code to be much leaner and meaner. This is probably the largest refactor I’ve done in terms of restructuring, but it desperately needed to happen.
Briefly, here are the (noteworthy) changes:
- fixes/modifications for Rails 2.0.2 compatibility
- complete revamp of the code base, now supporting a RESTful design
- posts are now located at
/posts/:idinstead of/posts/:year/:month/:day/:permalink(sorry to break your bookmarks) - archives now act like real archives (you can no longer get to posts for December of 2007 by visiting
/posts/2007/12, instead try/archives/2007/12– the same goes for tags:/archives/tag/:name) - removed “featured project” from home page
- added popular tags and recent comments in place of “featured project” on home page
- removed popular tags from sidebar and increased del.icio.us bookmarks to show 12 instead of 8
- implemented a new API module used to cache del.icio.us bookmarks and flickr photos (still have more changes to do there)
- added an admin namespace to replace inline editing (feels much cleaner to me)
- rearranged/removed several controllers/actions to make more sense
That’s basically it. Most of the changes were behind the scenes, except for the new addition to the home page. The only section that didn’t receive any attention was the portfolio. And that’s because I’m working on a new portfolio that will eventually let me get rid of the half-assed effort I have now. When I’m finished with it, it will be its own beast and live at its own (sub)domain.
UPDATE
I added support to map the old URLs, as well as the new ones. So bookmarks (like there are any) should still work.






Comments
Loving the changes to the front page mate, good job on finding such a nice complimentary colour. It would be cool to see some screenshots of the admin you’ve developed, it’s not every one who can say they built their own CMS :)
I agree, the site looks really nice.
I just wanted to point out your comment links are still pointing to the old URL scheme.
Time to use those generated URL helpers (see: rake routes) instead of url_for to catch those problems!
Luke—there’s nothing special about the admin section, it’s just basic CRUD operations for posts, categories, tags, and comments. The difference is until now, I built all of the admin stuff scattered throughout the site, and had inline editing via Ajax. I kept some of it (i.e. for editing/deleting comments), but most of it was extracted out into its own section.
Eric—I am using named routes and URL helpers. I stopped using
url_forthe week named routes were available.However, in order to support the old URLs, I would still need to keep the old route definitions (
/posts/:year/:month/:day/:permalink), as well as have a method tofind_by_permalink. While I’m still not throwing this idea out completely, I went on a rampage getting rid of all of the stuff I no longer needed/wanted around. But if that’s not what you’re suggesting, then let me know.And to both of you, thanks for the compliments.
Ryan – site looks cool.
Interesting that you mentioned that you had been using inline editing techniques for managing your site all along because I had been doing the exact opposite. I had always created virtually a separate site for managing everything. Until now, it worked fine, but it was like doing twice as much work. So, I’ve adopted something like what you had for my new site and I like it very much. It seems a lot easier to use and it sort of inspires me to do a better job with the site as a whole because I’m going to be using it to manage everything.