mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Some minor syntax tweaks, updated CHANGELOG.
This commit is contained in:
parent
fadb1bfc58
commit
0c3f8e42de
4 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
## 2.7.1 (Unreleased)
|
## 2.7.1 (Unreleased)
|
||||||
|
|
||||||
|
- [#189](https://github.com/airblade/paper_trail/pull/189) - Provided support for a `configure` block initializer.
|
||||||
- Added `setter` method for the `serializer` config option.
|
- Added `setter` method for the `serializer` config option.
|
||||||
|
|
||||||
## 2.7.0
|
## 2.7.0
|
||||||
|
|
|
@ -82,7 +82,7 @@ class Version < ActiveRecord::Base
|
||||||
model.class.unserialize_attributes_for_paper_trail attrs
|
model.class.unserialize_attributes_for_paper_trail attrs
|
||||||
attrs.each do |k, v|
|
attrs.each do |k, v|
|
||||||
if model.respond_to?("#{k}=")
|
if model.respond_to?("#{k}=")
|
||||||
model[k] = v
|
model[k.to_sym] = v
|
||||||
else
|
else
|
||||||
logger.warn "Attribute #{k} does not exist on #{item_type} (Version id: #{id})."
|
logger.warn "Attribute #{k} does not exist on #{item_type} (Version id: #{id})."
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,6 @@ class SerializerTest < ActiveSupport::TestCase
|
||||||
hash = {"widget_id" => nil, "name" => "Some text.", "id" => 1}
|
hash = {"widget_id" => nil, "name" => "Some text.", "id" => 1}
|
||||||
assert_equal YAML.dump(hash), @fluxor.versions[1].object
|
assert_equal YAML.dump(hash), @fluxor.versions[1].object
|
||||||
assert_equal hash, YAML.load(@fluxor.versions[1].object)
|
assert_equal hash, YAML.load(@fluxor.versions[1].object)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue