From eafe2c16cdd934b95a55adeccde5e7279b80b329 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 1 Feb 2018 11:17:11 +0000 Subject: Use the full class name for the JSON coder, as there may be another `JSON` constant defined. For example when using the `representable` gem: https://github.com/trailblazer/representable/issues/224 --- activestorage/app/models/active_storage/blob.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activestorage/app/models/active_storage/blob.rb b/activestorage/app/models/active_storage/blob.rb index 7067c58259..6112c57cc0 100644 --- a/activestorage/app/models/active_storage/blob.rb +++ b/activestorage/app/models/active_storage/blob.rb @@ -19,7 +19,7 @@ class ActiveStorage::Blob < ActiveRecord::Base self.table_name = "active_storage_blobs" has_secure_token :key - store :metadata, accessors: [ :analyzed, :identified ], coder: JSON + store :metadata, accessors: [ :analyzed, :identified ], coder: ActiveRecord::Coders::JSON class_attribute :service -- cgit v1.2.3