Some minor syntax tweaks, updated CHANGELOG.

This commit is contained in:
Ben Atkins 2013-01-21 10:38:43 -05:00 committed by David Butler
parent fadb1bfc58
commit 0c3f8e42de
4 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,6 @@
## 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.
## 2.7.0

View File

@ -90,7 +90,7 @@ module PaperTrail
def self.config
@@config ||= PaperTrail::Config.instance
end
def self.configure
yield config
end

View File

@ -82,7 +82,7 @@ class Version < ActiveRecord::Base
model.class.unserialize_attributes_for_paper_trail attrs
attrs.each do |k, v|
if model.respond_to?("#{k}=")
model[k] = v
model[k.to_sym] = v
else
logger.warn "Attribute #{k} does not exist on #{item_type} (Version id: #{id})."
end

View File

@ -31,10 +31,9 @@ class SerializerTest < ActiveSupport::TestCase
# Check values are stored as YAML.
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 hash, YAML.load(@fluxor.versions[1].object)
end
end