Archive for Design

Capital Raised

// March 26th, 2009 // Comments Off // Design, Site launches

I have just launched the new website for our partner company Capital Raised who are doing a great job helping businesses find much needed capital to fund their new ventures.

Props to Odin at twe4ked studios for taking on the coding when I was busy hacking on other things, like the Rails core.

New design

// March 25th, 2009 // 2 Comments » // CSS, Design, General ramblings

So what do you do on a Wednesday night, eat dinner, watch some TV, then redesign your blog until 1 in the morning. It was starting to eat away at me, I hadn’t touched the design for 8 months, it needed a Flickr feed, and I figured, why not chuck in a Twitter feed, that seems to be all the range these days.

So what do you think?

Displaying Flash’s in Rails easily

// October 31st, 2008 // 2 Comments » // CSS, Design, Ruby on Rails, development

In all my Rails applications I make use of the Flash method for displaying simple messages about system changes to the user, such as “Welcome back Ivan” when they login, or “Your details have been saved successfully” when the user saves their profile.

Rails can handle multiple Flash states in the flash hash, e.g. :notice, :error, :success. But how do you display these messages in a no nonsense fashion? with this simple display_flashes helper method I’ve written.

1
2
3
4
5
6
7
8
9
10
11
12
module ApplicationHelper
 
  def display_flashes
    return if flash.blank?
    flash_type = flash.keys.first.to_sym
 
    return content_tag(:div, :id => "flash_box", :class => "flash-wrapper") do
      content_tag(:div, flash[flash_type], :class => "flash #{flash_type}")
    end
  end
 
end

(more…)