Class: Plain::DocumentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Plain::DocumentsController
- Defined in:
- app/controllers/plain/documents_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/plain/documents_controller.rb', line 11 def create @conversation = Conversation.find(params[:conversation_id]) @message = @conversation..find(params[:message_id]) @document = Document.new(document_params) @document.content = @message.content if @document.save @docs_structure = DocsService.get_structure end end |
#new ⇒ Object
4 5 6 7 8 9 |
# File 'app/controllers/plain/documents_controller.rb', line 4 def new @conversation = Conversation.find(params[:conversation_id]) @message = @conversation..find(params[:message_id]) @document = Document.new @document.content = @message.content end |