diff --git a/gemfiles/activerecord42.gemfile.lock b/gemfiles/activerecord42.gemfile.lock index 9e29a4d..4dc6182 100644 --- a/gemfiles/activerecord42.gemfile.lock +++ b/gemfiles/activerecord42.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - gigo-activerecord (2.0.1) + gigo-activerecord (2.0.2) activerecord (>= 4.2.0) gigo diff --git a/gemfiles/activerecord50.gemfile.lock b/gemfiles/activerecord50.gemfile.lock index 087d00d..6723502 100644 --- a/gemfiles/activerecord50.gemfile.lock +++ b/gemfiles/activerecord50.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - gigo-activerecord (2.0.1) + gigo-activerecord (2.0.2) activerecord (>= 4.2.0) gigo diff --git a/gemfiles/activerecord51.gemfile.lock b/gemfiles/activerecord51.gemfile.lock index d8be9c9..ac2b36c 100644 --- a/gemfiles/activerecord51.gemfile.lock +++ b/gemfiles/activerecord51.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - gigo-activerecord (2.0.1) + gigo-activerecord (2.0.2) activerecord (>= 4.2.0) gigo diff --git a/gemfiles/activerecord52.gemfile.lock b/gemfiles/activerecord52.gemfile.lock index 758f3f9..8656d08 100644 --- a/gemfiles/activerecord52.gemfile.lock +++ b/gemfiles/activerecord52.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - gigo-activerecord (2.0.1) + gigo-activerecord (2.0.2) activerecord (>= 4.2.0) gigo diff --git a/lib/gigo/active_record/base.rb b/lib/gigo/active_record/base.rb index d77c67c..8e298a8 100644 --- a/lib/gigo/active_record/base.rb +++ b/lib/gigo/active_record/base.rb @@ -54,7 +54,7 @@ def load(yaml) Encoding.default_internal = GIGO.encoding value = YAML.load(GIGO.load(yaml)) unless value.is_a?(klass) - raise SerializationTypeMismatch, "Attribute was supposed to be a #{klass.to_s}, but was a #{hash.class}." + raise ::ActiveRecord::SerializationTypeMismatch, "Attribute was supposed to be a #{klass.to_s}, but was a #{value.class}: #{value.inspect}" end value ensure @@ -64,7 +64,7 @@ def load(yaml) def dump(value) return klass.new.to_yaml if value.nil? unless value.is_a?(klass) - raise SerializationTypeMismatch, "Attribute was supposed to be a #{klass.to_s}, but was a #{value.class}." + raise ::ActiveRecord::SerializationTypeMismatch, "Attribute was supposed to be a #{klass.to_s}, but was a #{value.class}: #{value.inspect}" end value.to_yaml end @@ -74,4 +74,3 @@ def dump(value) end ActiveRecord::Base.extend GIGO::ActiveRecord::Base - diff --git a/lib/gigo/active_record/version.rb b/lib/gigo/active_record/version.rb index ae13708..590d803 100644 --- a/lib/gigo/active_record/version.rb +++ b/lib/gigo/active_record/version.rb @@ -1,5 +1,5 @@ module GIGO module ActiveRecord - VERSION = "2.0.1" + VERSION = "2.0.2" end end