Skip to content

Instantly share code, notes, and snippets.

@bryckbost
Created July 7, 2010 14:24
Show Gist options
  • Save bryckbost/466757 to your computer and use it in GitHub Desktop.
Save bryckbost/466757 to your computer and use it in GitHub Desktop.
class Plant
include MongoMapper::Document
key :weight, Float, :numeric => true
end
p = Plant.new(:weight => 'String')
p.weight # => 0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment