Skip to content

Instantly share code, notes, and snippets.

@TheNicholasNick
Created May 27, 2009 02:09
Show Gist options
  • Save TheNicholasNick/118423 to your computer and use it in GitHub Desktop.
Save TheNicholasNick/118423 to your computer and use it in GitHub Desktop.
class Post < BaseCouchRestModel
end
class Person < BaseCouchRestModel
end
class Tag < BaseCouchRestModel
end
class BaseCouchRestModel < CouchRest::ExtendedDocument
# Include the validation module to get access to the validation methods
include CouchRest::Validation
def self.get(id)
begin
super
rescue RestClient::ResourceNotFound
nil
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment