Sha256: 6562a14e5f46535e7676132351a9a1cb82c14a89eafabce2d566adc3f7f323cd
Contents?: true
Size: 1.22 KB
Versions: 18
Compression:
Stored size: 1.22 KB
Contents
class ExportController < ArtfullyOseController def contacts @organization = current_user.current_organization @filename = "Artfully-People-Export-#{DateTime.now.strftime("%m-%d-%y")}.csv" @csv_string = @organization.people.includes(:tags, :phones, :address).all.to_comma send_data @csv_string, :filename => @filename, :type => "text/csv", :disposition => "attachment" end def donations @organization = current_user.current_organization @filename = "Artfully-Donations-Export-#{DateTime.now.strftime("%m-%d-%y")}.csv" @items = ItemView.where(:organization_id => current_organization).where(:product_type => "Donation").all @csv_string = @items.to_comma(:donation) send_data @csv_string, :filename => @filename, :type => "text/csv", :disposition => "attachment" end def ticket_sales @organization = current_user.current_organization @filename = "Artfully-Ticket-Sales-Export-#{DateTime.now.strftime("%m-%d-%y")}.csv" @items = ItemView.where(:organization_id => current_organization).where(:product_type => "Ticket").all @csv_string = @items.to_comma(:ticket_sale) send_data @csv_string, :filename => @filename, :type => "text/csv", :disposition => "attachment" end end
Version data entries
18 entries across 18 versions & 1 rubygems