Class: Envoy::MessagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Envoy::MessagesController
- Defined in:
- app/controllers/envoy/messages_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/envoy/messages_controller.rb', line 3 def create @conversation = Conversation.where(actor: envoy_current_actor).find(params[:conversation_id]) content = params.require(:message).fetch(:content) Envoy::RunJob.perform_later(@conversation, content) respond_to do |format| format.turbo_stream { @user_content = content } format.html { redirect_to conversation_path(@conversation) } end end |