Class: Wallaby::ResourcesResponder

Inherits:
ActionController::Responder
  • Object
show all
Includes:
Responders::FlashResponder
Defined in:
lib/responders/wallaby/resources_responder.rb

Overview

Resources responder

Direct Known Subclasses

JsonApiResponder

Instance Method Summary collapse

Instance Method Details

#to_csvObject

Render CSV with a file name that contains export timestamp.



11
12
13
14
# File 'lib/responders/wallaby/resources_responder.rb', line 11

def to_csv
  controller.headers['Content-Disposition'] = "attachment; filename=\"#{file_name_to_export}\""
  default_render
end