Class: DiscussionsMessagesController
- Inherits:
-
AjaxController
- Object
- ActionController::Base
- ApplicationController
- AjaxController
- DiscussionsMessagesController
- Includes:
- WithAuthorization, WithUserDiscussionValidation
- Defined in:
- app/controllers/discussions_messages_controller.rb
Instance Method Summary collapse
Methods included from WithAuthorization
#authorization_slug, #authorize_admin!, #authorize_janitor!, #authorize_moderator!, #authorize_owner!, #protection_slug
Methods inherited from ApplicationController
#current_workspace, #login_button, #redirect_to_main_organization!, #redirect_to_usage, #should_choose_organization?, #should_redirect_to_main_organization?, #validate_accessible!, #validate_active_organization!
Methods included from Mumuki::Laboratory::Controllers::IncognitoMode
#current_incognito_user?, #current_logged_user?, #current_user, #current_user?, #incognito_mode_enabled?
Methods included from Mumuki::Laboratory::Controllers::EmbeddedMode
#embedded_mode?, #enable_embedded_rendering, #standalone_mode?
Methods included from Mumuki::Laboratory::Controllers::DynamicErrors
#bad_record, #blocked_forum, #disabled, #disabled_organization, #forbidden, #gone, #internal_server_error, #not_found, #render_error, #unauthorized, #unprepared_organization
Methods included from Mumuki::Laboratory::Controllers::Notifications
#has_notifications?, #notifications_count, #user_notifications_path
Methods included from Mumuki::Laboratory::Controllers::Disabling
Methods included from Mumuki::Laboratory::Controllers::Authorization
#authorization_slug, #authorize_if_private!
Methods included from Mumuki::Laboratory::Controllers::CurrentOrganization
#organization_name, #set_current_organization!, #visit_organization!
Instance Method Details
#approve ⇒ Object
19 20 21 22 |
# File 'app/controllers/discussions_messages_controller.rb', line 19 def approve .toggle_approved! head :ok end |
#create ⇒ Object
9 10 11 12 |
# File 'app/controllers/discussions_messages_controller.rb', line 9 def create @discussion. , current_user redirect_back(fallback_location: root_path) end |
#destroy ⇒ Object
14 15 16 17 |
# File 'app/controllers/discussions_messages_controller.rb', line 14 def destroy .destroy! redirect_back(fallback_location: root_path) end |
#question ⇒ Object
24 25 26 27 |
# File 'app/controllers/discussions_messages_controller.rb', line 24 def question .toggle_not_actually_a_question! head :ok end |