Tuesday, November 30, 2010

Where is Zed?

Yesterday, I said goodbye to a dear friend.




















I will remember him for the joy, and for the good times.
love you, Shay!

Look over us.

Thursday, November 11, 2010

Rails Application variable II

Ah, it turns out that my heist and ignorance in Ruby and Rails I missed out on the Rails.cache options.
All you need is...


  def self.alive? (id)
    if Rails.cache.read(id)!=nil and (Time.now - Rails.cache.read(id))<10
      true
    else
      Rails.cache.delete(id)
      false
    end
   
  end
 
  def self.present(id)
    Rails.cache.write(id,Time.now)
  end

(...love)