Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ end
@note.subject # => "€20 – “WOOHOO”"
```

If you want to extend all `:string` and `:text` columns, use the `gigo_columns` method. All string/text columns will be GIGO'ized. Any arguments passed to `gigi_columns` will be excluded.
If you want to extend all `:string` and `:text` columns, use the `gigo_columns` method. All string/text columns will be GIGO'ized. Any arguments passed to `gigo_columns` will be excluded.

```ruby
class LegacyTable < ActiveRecord::Base
Expand Down
2 changes: 1 addition & 1 deletion lib/gigo/active_record/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def initialize(klass)
def load(yaml)
return klass.new if yaml.nil?
Encoding.default_internal = GIGO.encoding
value = YAML.load(GIGO.load(yaml))
value = YAML.unsafe_load(GIGO.load(yaml))
unless value.is_a?(klass)
raise ::ActiveRecord::SerializationTypeMismatch, "Attribute was supposed to be a #{klass.to_s}, but was a #{value.class}: #{value.inspect}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/gigo/active_record/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module GIGO
module ActiveRecord
VERSION = "2.0.2"
VERSION = "2.1.0"
end
end