lib/hybag/validator.rb in hybag-0.0.10 vs lib/hybag/validator.rb in hybag-0.0.11
- old
+ new
@@ -9,10 +9,10 @@
@bag = bag
end
def validate!
unless self.valid?
- raise "Invalid Object for bagging"
+ raise Hybag::InvalidBaggable.new(bag)
end
end
def bag_valid
errors.add(:bag, "is not valid for bagging.") unless bag.baggable?
\ No newline at end of file