Closed seancaffery closed 11 years ago
Looks good, an additional validates_presence_of :source_id, :source_type, :unless => :source_must_be_present?
would be nice, so we do not end up without an id/type :)
maybe those validations can go into a module like SourceValidation
Fair enough. Done :) The rails 2 build is failing, but I am not sure why. Any ideas?
v0.5.3 is out!
test fixes https://github.com/grosser/cia/commit/b4044290d866cae1bfabe1ce6e58fafb46967d64
This will allow attribute changes to be saved without having the class that contains the change available. The
validates_presence_of
method tries to load the class associated with the attribute change because of the polymorphic association onsource
this is a problem when the project that handles auditing does not contain the classes for the audited change. I chose to follow the rules on theEvent
class for determining the need for a source. It might also require some protection on thesource
association as well./cc @grosser