Created
December 29, 2009 08:26
-
-
Save erik-megarad/265216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FUCK NO | |
class Person | |
include Mongoid::Document | |
field :athing, :type => String, :default => "Something" | |
validates_format_of :athing, :with => /[A-Za-z]/ | |
end | |
# HELL YES | |
class Person | |
include Mongoid::Document | |
string :athing do | |
default "Someting" | |
format /[A-Za-z]/ | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment