Class: MessageAttachmentsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- MessageAttachmentsController
- Defined in:
- app/controllers/message_attachments_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /message_attachments.
-
#destroy ⇒ Object
DELETE /message_attachments/1.
-
#edit ⇒ Object
GET /message_attachments/1/edit.
-
#index ⇒ Object
GET /message_attachments.
-
#new ⇒ Object
GET /message_attachments/new.
-
#show ⇒ Object
GET /message_attachments/1.
-
#update ⇒ Object
PATCH/PUT /message_attachments/1.
Instance Method Details
#create ⇒ Object
POST /message_attachments
23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/message_attachments_controller.rb', line 23 def create @message_attachment = MessageAttachment.new() if @message_attachment.save redirect_to @message_attachment, notice: 'Message attachment was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /message_attachments/1
43 44 45 46 |
# File 'app/controllers/message_attachments_controller.rb', line 43 def destroy @message_attachment.destroy redirect_to , notice: 'Message attachment was successfully destroyed.' end |
#edit ⇒ Object
GET /message_attachments/1/edit
19 20 |
# File 'app/controllers/message_attachments_controller.rb', line 19 def edit end |
#index ⇒ Object
GET /message_attachments
5 6 7 |
# File 'app/controllers/message_attachments_controller.rb', line 5 def index @message_attachments = MessageAttachment.all end |
#new ⇒ Object
GET /message_attachments/new
14 15 16 |
# File 'app/controllers/message_attachments_controller.rb', line 14 def new @message_attachment = MessageAttachment.new end |
#show ⇒ Object
GET /message_attachments/1
10 11 |
# File 'app/controllers/message_attachments_controller.rb', line 10 def show end |
#update ⇒ Object
PATCH/PUT /message_attachments/1
34 35 36 37 38 39 40 |
# File 'app/controllers/message_attachments_controller.rb', line 34 def update if @message_attachment.update() redirect_to @message_attachment, notice: 'Message attachment was successfully updated.' else render :edit end end |