Class: Decidim::System::DestroyOAuthApplication
- Defined in:
- decidim-system/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.
Methods inherited from Command
call, #evaluate, #method_missing, #respond_to_missing?, #transaction, #with_events
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 'decidim-system/app/commands/decidim/system/destroy_oauth_application.rb', line 11 def initialize(application, current_user) @application = application @current_user = current_user end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Decidim::Command
Instance Method Details
#call ⇒ Object
Public: Executes the command.
Broadcasts :ok if it got destroyed
19 20 21 22 |
# File 'decidim-system/app/commands/decidim/system/destroy_oauth_application.rb', line 19 def call destroy_application broadcast(:ok) end |