17 Jan 2010

Just about got things working

I just about have things working the way I want. Syntax highlighting on here is decent, I really enjoy "SyntaxHighlighter", I have used it before with other sites, but I wish I was able to make use of the themes and customize it a bit. Maybe you can? Below is a little test for myself.

class UserSessionsController < ApplicationController
  
  layout "site"
  
  before_filter :require_user, :only => [:destroy]
  
  def new
    @user_session = UserSession.new
  end

  def create
   @user_session = UserSession.new(params[:user_session])
   if @user_session.save && current_user.is_active?
     flash[:notice] = "Login successful!"
     redirect_to dashboard_path
   else
     render :action => :new
   end
 end

 def destroy
   current_user_session.destroy
   flash[:notice] = "Logout successful!"
   redirect_to login_path
 end
 
end

Here is the link describing how to get the highlighting if anyone is wondering... http://news.ycombinator.com/item?id=366718

I will probably keep poking around with my theme on my off time, but I am pretty content with it for now!

16 Jan 2010

First post from posterous

I decided for one of my new years resolutions that I would actually start blogging about code and what not. I had a wordpress last year, but I really did not like it much nor make use of it.  I messed with writing my own with Rails, but I really liked what I saw in posterous.

Posterous has some really sick features that I look forward to using. I have not quite figured out how to enable code highlighting, but I have seen a few blogs out there with it, so I'm sure I am just missing a little something. Soon as get the syntax highlighting quirks out, I will start posting some code.

 

Garrett Johnson's Posterous

Garrett is a software developer from Charlotte, North Carolina. He is sickly obsessed with building software, enjoys skating when he has the time, and has a wonderful girlfriend Elizabeth, whom puts up with his non-stop, late night programming.