Typo Admin Categories Quick Fix

Just to keep up some geek cred and get off the real estate kick, here's a quick fix for Typo.

When adding a post, the categories box lists the categories in a random order (ie by their numerical id's, which means very little to a human). To sort them in alphabetical order, which is of course the proper way to do it, make the following change to app/controllers/admin/content_controller.rb:

Line # 30 will read:

@categories = Category.find_all

Change it to:

@categories = Category.find_all.sort {|a,b| a.name.capitalize <=> b.name.capitalize}

There, isn't that better?

Update: Do the same on line 12 to hit the "Quick Post" functionality

Categories

,

0 TrackBacks

Listed below are links to weblogs that reference this post: Typo Admin Categories Quick Fix.

TrackBack URL for this entry: http://andywismar.com/cgi-bin/mt-tb.cgi/36

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)