Class: Chat::ConversationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/chat/conversations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/chat/conversations_controller.rb', line 10

def create
  @conversation = Chat::Conversation.create(conversation_params)

  if @conversation.persisted? ||
      @conversation.errors.messages[:sessions].present?
    render template: "chat/conversations/create"
  else
    @conversation = find_existing_conversation
    render template: "chat/conversations/show"
  end
end

#showObject



7
8
# File 'app/controllers/chat/conversations_controller.rb', line 7

def show
end