Skip to content

Instantly share code, notes, and snippets.

@morganp
Created October 13, 2010 01:31
Show Gist options
  • Save morganp/623251 to your computer and use it in GitHub Desktop.
Save morganp/623251 to your computer and use it in GitHub Desktop.
#Better way to delete if it exists
if UnWatched::Node.exists?( :name=>file_name )
node = UnWatched::Node.find_by_name( file_name )
UnWatched::Node.destroy(node)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment