Sha256: b4b9493b07751f8ecf77072f3d031481f4dfb48914b36ae610f0591091e96147
Contents?: true
Size: 717 Bytes
Versions: 2
Compression:
Stored size: 717 Bytes
Contents
module Listings class ListingsController < ActionController::Base include ActionViewExtensions def full @listing = prepare_listing params, view_context render 'listings/full' end def content @listing = prepare_listing params, view_context render 'listings/content' end def export @listing = prepare_listing params, view_context, false respond_to do |format| format.csv { send_data @listing.to_csv, filename: @listing.export_filename(:csv) } format.xls do headers["Content-Disposition"] = "attachment; filename=\"#{@listing.export_filename(:xls)}\"" render 'listings/export' end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
listings-0.1.6 | app/controllers/listings/listings_controller.rb |
listings-0.1.5 | app/controllers/listings/listings_controller.rb |