Skip to content

Instantly share code, notes, and snippets.

@ddollar
Created March 26, 2009 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddollar/86313 to your computer and use it in GitHub Desktop.
Save ddollar/86313 to your computer and use it in GitHub Desktop.
validate_presence_of :name, :if => :should_validate_name?
def should_validate_name?
parent_object.has_certain_properties?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment