Skip to content

Instantly share code, notes, and snippets.

@spacecowb0y
Created March 31, 2011 17:34
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 spacecowb0y/896836 to your computer and use it in GitHub Desktop.
Save spacecowb0y/896836 to your computer and use it in GitHub Desktop.
default name: "Chuck Norris"
class User
include DataMapper::Resource
# PROPERTIES
property :id, Serial
property :fullname, String, :default => "Chuck Norris"
property :password, String
property :created_at, DateTime
property :updated_at, DateTime
validates_presence_of :password, :unless => :fullname == "Chuck Norris" #BECAUSE CHUCK NORRIS DOESN'T NEED A PASSWORD
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment