lib/xsys/model/corporation.rb in xsys-0.33.0 vs lib/xsys/model/corporation.rb in xsys-0.34.0

- old
+ new

@@ -8,13 +8,13 @@ attr_reader *attr_list def initialize(attributes={}) attributes.each do |k, v| if k.to_s == 'taxes' - @taxes = v.map { |x| CorporationTax.new(x) } unless v.nil? + self.taxes = v.map { |x| CorporationTax.new(x) } unless v.nil? else + self.send("#{k}=", v) if self.respond_to?(k) end - self.send("#{k}=", v) if self.respond_to?(k) end end private