Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
default name: "Chuck Norris"
class User
include DataMapper::Resource
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment