Skip to content
Create a gist now

Instantly share code, notes, and snippets.

class Comment < Ohm::Model
class Post < Ohm::Model
list :comments, Comment
post = Post.create
10.times { post.comments.push(Comment.create) }
# Getting the first 3 comments could only be done using:
Ohm.redis.lrange post.comments.key, 0, 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.