Sha256: f3717c11864661745ebede5bbd20211e64017c3d40cfdae38a724e5e48f5ae5e
Contents?: true
Size: 805 Bytes
Versions: 14
Compression:
Stored size: 805 Bytes
Contents
module ActiveJobHelpers def active_job_args_wrapper(args: [], params: nil) if (DependencyHelper.rails6_1_present? && DependencyHelper.ruby_3_1_or_newer?) || DependencyHelper.rails7_present? wrapped_args = {} if params if DependencyHelper.rails7_present? wrapped_args["_aj_ruby2_keywords"] = ["params", "args"] wrapped_args["args"] = [] wrapped_args["params"] = { "_aj_symbol_keys" => ["foo"] }.merge(params) else wrapped_args["_aj_symbol_keys"] = ["foo"] wrapped_args.merge!(params) end else wrapped_args["_aj_ruby2_keywords"] = ["args"] wrapped_args["args"] = args end [wrapped_args] else params.nil? ? args : args + [params] end end end
Version data entries
14 entries across 14 versions & 1 rubygems