Skip to content

Instantly share code, notes, and snippets.

@siassaj
Created December 7, 2015 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siassaj/c5e6b7bcf29be5e626a6 to your computer and use it in GitHub Desktop.
Save siassaj/c5e6b7bcf29be5e626a6 to your computer and use it in GitHub Desktop.
def batch_headers
data = @template.placeholders.map(&:value).join(',')
name = /(.*)\..*/.match(@template.name)[1]
send_data data, :filename => "#{name}.csv", type: :csv
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment