August Updates

In which I describe what I've been up to over the last month and a half.

Over the last month and a half I've:

  • Worked on client projects
  • Turned 18
  • Made 13 separate designs for this website, only one of which I liked (you're looking at it)
  • Started work on a new blog system, realized it wasn't worth it and ported all the new code to this system
  • Switched from NewsFire to Shaun Inman's Fever because it has an iPhone interface and because Shaun Inman made it (go Mint)!
  • Bookmarked a bunch of iPhone developer tutorials, which I plan to read and do soon

I put all that into list format because I didn't feel like writing paragraphs about it, enjoy!

Updates to the Website

As the perceptive individual would have noticed, I've re-designed/aligned my entire site. Even the administration panel received a make-over. There's no rhyme or reason behind it. I was just bored. No major features were added to the front-end of the site, everything worked fine so I saw no reason to change. The only difference is how the static pages (About page) are handled. They now use a carbon copy of Thoughtbot's high_voltage baked directly in to the rest of the site (I didn't feel like using the engine, personal preference). There's also a fair bit of optimization going around, mostly through the use of counter cache columns and :include => ...'s in find()'s. On my computer at least, the site seems to run a lot faster.

Administration Panel Make-over

The layout and design remain unchanged for the most part. Everything is now a little more grid-like, and the code has evolved to a little more HTML5-like. New form submit buttons make managing posts smoother:

<%= form.submit "Save" %>
<%= form.submit "Save and continue editing", :name => "continue_editing" %>
<%= form.submit "Save and add another", :name => "add_another" %>

A private method in the posts controller to make these work properly:

def redirect_after_success
  if params[:commit]
    redirect_to(admin_posts_path)
  elsif params[:continue_editing]
    redirect_to(edit_admin_post_path(@post))
  elsif params[:add_another]
    redirect_to(new_admin_post_path)
  else
    redirect_to(admin_post_path)
  end
end

And everything is dandy! If you're wondering what the difference is between private and protected methods, or are confused in any way, check out the Venerable Jamis Buck's post about Method Visibility in Ruby.

Last, but not least, was a new authentication system. Again I went with Thoughbot's code to solve my problems, with their Rails authentication engine, Clearance. Also, as with high_voltage, I put the code directly into my app instead of using the actual engine, which allowed me to customize it to my liking.

Filed in The Site.