lib/acts_as.rb in acts_as-0.2.0 vs lib/acts_as.rb in acts_as-0.2.2

- old
+ new

@@ -15,9 +15,17 @@ .reduce(super) do |current, association_changes| current.merge(association_changes) end end + def update_column(name, value) + if (association = self.class.acts_as_fields.detect { |k,v| v.include?(name.to_s) }.try(:first)).present? + send(association).update_column name, value + else + super + end + end + private def acts_as_field_match?(method) @association_match = self.class.acts_as_fields.select do |association, fields| fields.select { |f| method.to_s.include?(f) }.any?