Skip to content
Browse files

Fix validation of Decimal scale/precision options

  • Loading branch information...
1 parent 3126b77 commit a51190c8e02075cf504ed75753e356161b0f7a88 @solnic solnic committed Sep 14, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/dm-core/property/decimal.rb
View
4 lib/dm-core/property/decimal.rb
@@ -15,8 +15,8 @@ def initialize(model, name, options = {})
super
[ :scale, :precision ].each do |key|
- unless options.key?(key)
- warn "options[#{key.inspect}] should be set for #{self.class}, defaulting to #{send(key).inspect}"
+ unless @options.key?(key)
+ warn "options[#{key.inspect}] should be set for #{self.class}, defaulting to #{send(key).inspect} (#{caller.first})"
end
end

0 comments on commit a51190c

Please sign in to comment.
Something went wrong with that request. Please try again.