Skip to content

Instantly share code, notes, and snippets.

@kaeff
Created August 12, 2015 17:20
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 kaeff/f53fb3529107719a8e6b to your computer and use it in GitHub Desktop.
Save kaeff/f53fb3529107719a8e6b to your computer and use it in GitHub Desktop.
class InviteCode < CouchRest::Model::Base
use_database :invite_codes
design do
view :by__id
end
end
@kaeff
Copy link
Author

kaeff commented Aug 12, 2015

Schnipsel von der mittwoch session, mit dem wir InviteCodes aus der Datenbank abgefragt haben:

irb(main):003:0> InviteCode.find_by__id '1200db679752d47d8a1c844140f62652'
=> #<InviteCode _id: "1200db679752d47d8a1c844140f62652", _rev: "1-e52cad0aaae05dc5926f17833fab3786", type: "InviteCode">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment