Answer the question
In order to leave comments, you need to log in
How to create a complex nested Redis model in RoR?
I decided to use redis for something other than session storage and caching. And immediately I ran into a problem that I could not solve by googling (maybe because of Friday Saturday). You need to create a view model:
"news" =>
{
"user1"=>[
{"first_hash"=>"first value"},
{"second_hash"=>"second value"},
{"third_hash"=>"third value"},
{"last_key"=>"last value"}
],
"user2"=>[
{"first_hash"=>"first value"},
{"second_hash"=>"second value"},
{"third_hash"=>"third value"},
{"last_key"=>"last value"}
],
"user3"=>[
{"first_hash"=>"first value"},
{"second_hash"=>"second value"},
{"third_hash"=>"third value"},
{"last_key"=>"last value"}
]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question