Skip to content

Commit

Permalink
Ruby 3 minimal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren committed Feb 9, 2024
1 parent 5c2d1fb commit ff2faca
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/models/foreman_tasks/concerns/action_triggering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def update_action; end
# @override
def destroy_action; end

def save(*args)
dynflow_task_wrap(:save) { super(*args) }
def save(...)
dynflow_task_wrap(:save) { super(...) }
end

def save!(*args)
dynflow_task_wrap(:save) { super(*args) }
def save!(...)
dynflow_task_wrap(:save) { super(...) }
end

def destroy
Expand All @@ -37,14 +37,14 @@ def destroy

# In order to use host.<attribute>_changed?, we must assign_attributes to
# the host record for these update and update! methods.
def update(*args)
assign_attributes(*args)
def update(...)
assign_attributes(...)
dynflow_task_wrap(:save) { save }
end
alias update_attributes update

def update!(*args)
assign_attributes(*args)
def update!(...)
assign_attributes(...)
dynflow_task_wrap(:save) { save! }
end
alias update_attributes! update!
Expand Down

0 comments on commit ff2faca

Please sign in to comment.