app/models/piggybak/tax_method.rb in piggybak-0.6.25 vs app/models/piggybak/tax_method.rb in piggybak-0.6.26

- old
+ new

@@ -8,10 +8,10 @@ accepts_nested_attributes_for :tax_method_values, :allow_destroy => true attr_accessible :active, :tax_method_values_attributes, :description, :klass validates_each :tax_method_values do |record, attr, value| - if record.klass + if record.klass.present? calculator = record.klass.constantize metadata_keys = value.collect { |v| v.key }.sort if calculator::KEYS.sort != metadata_keys if calculator::KEYS.empty? record.errors.add attr, "You don't need any metadata for this method."