aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorRenaud Chaput <renchap@gmail.com>2018-02-01 11:17:11 +0000
committerRenaud Chaput <renchap@gmail.com>2018-02-01 11:17:11 +0000
commiteafe2c16cdd934b95a55adeccde5e7279b80b329 (patch)
tree5fa11e31c1da061fd98306ace3bf7fb0080eb12e /activestorage
parent4f0eb1ccd9652118b05d42f152adaa4df7dc3388 (diff)
downloadrails-eafe2c16cdd934b95a55adeccde5e7279b80b329.tar.gz
rails-eafe2c16cdd934b95a55adeccde5e7279b80b329.tar.bz2
rails-eafe2c16cdd934b95a55adeccde5e7279b80b329.zip
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
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/app/models/active_storage/blob.rb2
1 files changed, 1 insertions, 1 deletions
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