Skip to content

Instantly share code, notes, and snippets.

@maheshmurthy
Created June 26, 2012 04:43
Embed
What would you like to do?
class Weight
include Mongoid::Document
field :bench_press, {:type => Range}
end
console> w = Weight.new
console> w.bench_press = [100,150]
console> w.bench_press.min
100
console> w.bench_press.max
150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment