Class: Abrasf::Desif::ServiceItemsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/abrasf/desif/service_items_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /service_items



11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/abrasf/desif/service_items_controller.rb', line 11

def index
  respond_to do |format|
    format.html
    format.csv do
      # send_data @service_items.to_csv,
      send_data @service_items,
                type: Mime[:csv],
                disposition: 'attachment; filename=attachament_4.csv'
    end
  end
end