Skip to content

Instantly share code, notes, and snippets.

@rodreegez
Created March 21, 2009 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodreegez/82927 to your computer and use it in GitHub Desktop.
Save rodreegez/82927 to your computer and use it in GitHub Desktop.
class Upload < ActiveRecord::Base
has_attached_file :uploaded_file
validates_presence_of :uploaded_file
end
def self.list_all_files
find(:all, :order => "created_at DESC")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment