Class: Nuntius::Admin::Layouts::AttachmentsController
- Inherits:
-
Nuntius::ApplicationController
- Object
- Nuntius::ApplicationController
- Nuntius::Admin::Layouts::AttachmentsController
- Defined in:
- app/controllers/nuntius/admin/layouts/attachments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/nuntius/admin/layouts/attachments_controller.rb', line 12 def create params[:attachments].each do |file| @layout..attach(file) end end |
#destroy ⇒ Object
18 19 20 21 22 23 |
# File 'app/controllers/nuntius/admin/layouts/attachments_controller.rb', line 18 def destroy = @layout..find_by(id: params[:id]) &.purge render :create end |
#index ⇒ Object
9 10 |
# File 'app/controllers/nuntius/admin/layouts/attachments_controller.rb', line 9 def index end |