diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:40:07 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:40:07 +0200 |
commit | 93c9534c9871d4adad4bc33b5edc355672b59c61 (patch) | |
tree | c9d8782bfb88207cd5857eb903b5f169fe593fea /activejob/lib/active_job/core.rb | |
parent | 4c208254573c3428d82bd8744860bd86e1c78acb (diff) | |
download | rails-93c9534c9871d4adad4bc33b5edc355672b59c61.tar.gz rails-93c9534c9871d4adad4bc33b5edc355672b59c61.tar.bz2 rails-93c9534c9871d4adad4bc33b5edc355672b59c61.zip |
applies new string literal convention in activejob/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
Diffstat (limited to 'activejob/lib/active_job/core.rb')
-rw-r--r-- | activejob/lib/active_job/core.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/activejob/lib/active_job/core.rb b/activejob/lib/active_job/core.rb index 1b5ddff17b..a338061766 100644 --- a/activejob/lib/active_job/core.rb +++ b/activejob/lib/active_job/core.rb @@ -36,7 +36,7 @@ module ActiveJob module ClassMethods # Creates a new job instance from a hash created with +serialize+ def deserialize(job_data) - job = job_data['job_class'].constantize.new + job = job_data["job_class"].constantize.new job.deserialize(job_data) job end @@ -78,13 +78,13 @@ module ActiveJob # queueing adapter. def serialize { - 'job_class' => self.class.name, - 'job_id' => job_id, - 'queue_name' => queue_name, - 'priority' => priority, - 'arguments' => serialize_arguments(arguments), - 'executions' => executions, - 'locale' => I18n.locale.to_s + "job_class" => self.class.name, + "job_id" => job_id, + "queue_name" => queue_name, + "priority" => priority, + "arguments" => serialize_arguments(arguments), + "executions" => executions, + "locale" => I18n.locale.to_s } end @@ -109,13 +109,13 @@ module ActiveJob # end # end def deserialize(job_data) - self.job_id = job_data['job_id'] - self.provider_job_id = job_data['provider_job_id'] - self.queue_name = job_data['queue_name'] - self.priority = job_data['priority'] - self.serialized_arguments = job_data['arguments'] - self.executions = job_data['executions'] - self.locale = job_data['locale'] || I18n.locale.to_s + self.job_id = job_data["job_id"] + self.provider_job_id = job_data["provider_job_id"] + self.queue_name = job_data["queue_name"] + self.priority = job_data["priority"] + self.serialized_arguments = job_data["arguments"] + self.executions = job_data["executions"] + self.locale = job_data["locale"] || I18n.locale.to_s end private |