Logidze v0.7.0 Release Notes
Release Date: 2018-08-29 // over 5 years ago-
🛠 [Fixes #75] Fix association versioning with an optional belongs to ([@ankursethi-uscis][])
[PR #79] Allow adding meta information to versions using
with_meta
(addressed Issue [#60]). ([@DmitryTsepelev][])
Usage:
Logidze.with_meta(ip: request.ip) { post.save } puts post.meta # => { 'ip' => '95.66.157.226' }
⬆️ How to upgrade.
⚡️ Please run
rails generate logidze:install --update
to regenerate stored functions.This feature replaces the implementation of
with_responsible
, nowresponsible_id
is stored inside of the meta hash with the key_r
.There is fallback to the old data structure (
{ 'r' => 42 }
opposed to{ 'm' => { '_r' => 42 } }
in the current implementation), soresponsible_id
should work as usual for the existing data.If you've accessed the value manually (e.g.
post.log_data.current_version.data['r']
), you'll have to add the fallback too.