Class: Decidim::System::DestroyOAuthApplication
- Inherits:
-
Command
- Object
- Command
- Decidim::System::DestroyOAuthApplication
- Defined in:
- app/commands/decidim/system/destroy_oauth_application.rb
Overview
This command deals with destroying an application from the admin panel.
Instance Method Summary collapse
-
#call ⇒ Object
Public: Executes the command.
-
#initialize(application, current_user) ⇒ DestroyOAuthApplication
constructor
Public: Initializes the command.
Constructor Details
#initialize(application, current_user) ⇒ DestroyOAuthApplication
Public: Initializes the command.
application - The OAuthApplication to be destroyed. user - The user that destroys the application.
11 12 13 14 |
# File 'app/commands/decidim/system/destroy_oauth_application.rb', line 11 def initialize(application, current_user) @application = application @current_user = current_user end |
Instance Method Details
#call ⇒ Object
Public: Executes the command.
Broadcasts :ok if it got destroyed
19 20 21 22 |
# File 'app/commands/decidim/system/destroy_oauth_application.rb', line 19 def call destroy_application broadcast(:ok) end |