OOR - Object Oriented Redis.
1. key(:something)
is dead, long live key[:something]
Basically you just have to change the method signature. An example follows:
Another important thing to note here, is that the return value of Ohm::Model#key
and Ohm::Model::key
are no longer strings, but a customized version of Nest.
You can do all sorts of Redis operations on keys now. I'll let the code do the talking:
2. .raw
is now the new and awesome .key
(for Set
s, List
s, etc)
If you were previously doing raw Redis operations on sets using .raw, you have to make a small change to your code.
As previously mentioned, we can do all sorts of Redis operations on key[:sorted_position_tags]
. Basically everything except KEYS
.
3. There is no step 3 (except the ohm-contrib update)
The latest ohm-contrib has been updated to work with the latest ohm version.
Unfortunately, the patch doesn't do any backward compatibility check with older Ohm versions.
(Although the only two plugins that broke during the upgrade were Ohm::Boundaries and Ohm::Locking).