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!