Skip to content

Instantly share code, notes, and snippets.

View reddyonrails's full-sized avatar

Jagan Reddy reddyonrails

View GitHub Profile
@reddyonrails
reddyonrails / nested-redis.rb
Created November 6, 2019 17:59 — forked from Loupi/nested-redis.rb
Redis Nested Comments in Ruby
require 'redis'
require 'json'
class CommentsRepository
def initialize
@redis = Redis.new
end
def save(itemId, comment, parentId = nil)