Skip to content

Instantly share code, notes, and snippets.

language_code name
af Afrikaans
am Amharic
ar Arabic
arq Algerian Arabic
art-x-bork Swedish Chef
as Assamese
ast Asturian
az Azerbaijani
be Belarusian
jwarchol / gist:9020
Created September 5, 2008 20:32 — forked from anonymous/gist:9016
class Update < ActiveRecord::Base
belongs_to :job_id, :foreign_key => 'job_id', :class_name => 'Job'
file_column :attachment
def authorized_for_destroy?
return false if new_record?
return Update.count(:conditions => ["created_at > ?", self.created_at]) == 0