Skip to content

Instantly share code, notes, and snippets.

@myobie
Created Jul 17, 2009
Embed
What would you like to do?
+++ my-dm-validations.rb
--- dm-validations.rb
@@ -87,7 +87,6 @@
# Check if a resource is valid in a given context
#
def valid?(context = :default)
+ return true if respond_to?(:model) && !self.new? && !self.dirty?
klass = respond_to?(:model) ? model : self.class
klass.validators.execute(context, self)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment