mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-03-15 12:29:16 +01:00
(bug) fix unable to update/delete a space
This commit is contained in:
parent
1db7dfc723
commit
766c08a302
@ -27,7 +27,7 @@ class API::SpacesController < API::ApiController
|
||||
end
|
||||
|
||||
def update
|
||||
authorize Space
|
||||
authorize @space
|
||||
if @space.update(space_params)
|
||||
render :show, status: :ok, location: @space
|
||||
else
|
||||
@ -45,7 +45,7 @@ class API::SpacesController < API::ApiController
|
||||
private
|
||||
|
||||
def set_space
|
||||
Space.friendly.find(params[:id])
|
||||
@space = Space.friendly.find(params[:id])
|
||||
end
|
||||
|
||||
def space_params
|
||||
|
Loading…
x
Reference in New Issue
Block a user