Skip to content

Commit

Permalink
also call set_foodcoop before desirializing 350a98d
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbauer committed Feb 3, 2025
1 parent e3d2af7 commit b13930c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions config/initializers/active_job_select_foodcoop.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module FoodsoftActiveJobArguments
def self.included(base) # :nodoc:
base.class_eval do
alias_method :orig_deserialize, :deserialize
alias_method :orig_serialize, :serialize

def deserialize(arguments)
FoodsoftConfig.select_multifoodcoop arguments[0]
orig_deserialize(arguments)
end
end
end
end

ActiveSupport.on_load(:after_initialize) do
ActiveJob::Arguments.include FoodsoftActiveJobArguments
end

0 comments on commit b13930c

Please sign in to comment.