Skip to content

Commit

Permalink
fix: Service not being update-able
Browse files Browse the repository at this point in the history
  • Loading branch information
mromulus committed Feb 15, 2024
1 parent 83d7acf commit 0ae107a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/services_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def show
end

def update
if @service.update service_params
if authorize(@service).update(service_params)
redirect_to [@service.exercise, @service], notice: 'Service was successfully updated.'
else
render :show, status: 400
Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/vm_cache_buster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ def get_service
self
else
service
end.tap { |s| s.reload if s.persisted? }
end.dup.tap { |s| s.reload if s.persisted? }
end
end

0 comments on commit 0ae107a

Please sign in to comment.