Class: Aven::WorkspacesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Aven::WorkspacesController
- Defined in:
- app/controllers/aven/workspaces_controller.rb
Instance Method Summary collapse
-
#switch ⇒ Object
POST /workspaces/:id/switch.
Methods inherited from ApplicationController
#current_workspace, #current_workspace=
Methods included from ApplicationHelper
#aven_importmap_tags, #view_component
Instance Method Details
#switch ⇒ Object
POST /workspaces/:id/switch
8 9 10 11 12 |
# File 'app/controllers/aven/workspaces_controller.rb', line 8 def switch workspace = current_user.workspaces.friendly.find(params[:id]) self.current_workspace = workspace redirect_to after_switch_workspace_path, notice: "Switched to #{workspace.label}" end |