0.9.0
Features
- Added
#reload_log_data
to fetch the actuallog_data
from DB.
user = User.create!(params)
user.log_data #=> nil, 'cause it's generated DB-side
user.reload_log_data
user.log_data #=> Logidze::History
- Added
:ignore_log_data
option to#has_logidze
to avoid selectinglog_data
by default.
Usage:
class User < ActiveRecord::Base
has_logidze ignore_log_data: true
end
User.all #=> SELECT id, name FROM users
User.with_log_data #=> SELECT id, name, log_data FROM users
user = User.find(params[:id])
user.log_data #=> ActiveModel::MissingAttributeError
user.reload_log_data #=> Logidze::History