Skip to content

Instantly share code, notes, and snippets.

@koic
Created November 29, 2016 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koic/bf31bc0f89427cc9e61fae0371873ad0 to your computer and use it in GitHub Desktop.
Save koic/bf31bc0f89427cc9e61fae0371873ad0 to your computer and use it in GitHub Desktop.
A patch for Rails 5 (with Oracle) and Enumerize
#
# activemodel-5.0.0.1/lib/active_model/type/string.rb
#
module ActiveModel
module Type
class String < ImmutableString # :nodoc:
...
def serialize(value)
case value
when ::String then value.to_s
else super
end
end
...
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment