Skip to content

Instantly share code, notes, and snippets.

@maheshmurthy
Created June 26, 2012 04:43
Show Gist options
  • Save maheshmurthy/2993330 to your computer and use it in GitHub Desktop.
Save maheshmurthy/2993330 to your computer and use it in GitHub Desktop.
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