aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/serializers
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2018-02-09 14:24:55 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2018-02-14 13:10:07 -0500
commitec686a471e0a54194fc9ec72e639785606597704 (patch)
tree51cdf085e1346e11ef2ae5b47f989dd751da7ff3 /activejob/lib/active_job/serializers
parent3785a5729959a838bb13f2d298a59e12e1844f74 (diff)
downloadrails-ec686a471e0a54194fc9ec72e639785606597704.tar.gz
rails-ec686a471e0a54194fc9ec72e639785606597704.tar.bz2
rails-ec686a471e0a54194fc9ec72e639785606597704.zip
Simplify the implementation of custom serialziers
Right now it is only possible to define serializers globally so we don't need to use a class attribute in the job class.
Diffstat (limited to 'activejob/lib/active_job/serializers')
-rw-r--r--activejob/lib/active_job/serializers/hash_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/lib/active_job/serializers/hash_serializer.rb b/activejob/lib/active_job/serializers/hash_serializer.rb
index eee081de7c..c4dcfaf094 100644
--- a/activejob/lib/active_job/serializers/hash_serializer.rb
+++ b/activejob/lib/active_job/serializers/hash_serializer.rb
@@ -38,7 +38,7 @@ module ActiveJob
def serialize_hash_key(key)
raise SerializationError.new("Only string and symbol hash keys may be serialized as job arguments, but #{key.inspect} is a #{key.class}") unless [String, Symbol].include?(key.class)
- raise SerializationError.new("Can't serialize a Hash with reserved key #{key.inspect}") if ActiveJob::Base.reserved_serializers_keys.include?(key.to_s)
+ raise SerializationError.new("Can't serialize a Hash with reserved key #{key.inspect}") if ActiveJob::Serializers.reserved_serializers_keys.include?(key.to_s)
key.to_s
end