Sha256: 1aee23c964710c306a13497564dc4843b6e98eff835382f78f466bf05f1ef45d
Contents?: true
Size: 324 Bytes
Versions: 53
Compression:
Stored size: 324 Bytes
Contents
ActionController::Renderers.add :csv do |obj, options| csv = obj.respond_to?(:to_csv) ? obj.to_csv(options) : obj if filename = options[:filename] send_data csv, type: Mime::CSV, disposition: "attachment; filename=#{filename}.csv" else self.content_type ||= Mime::CSV self.response_body = csv end end
Version data entries
53 entries across 53 versions & 2 rubygems