Sha256: 40b23763d7a8efa150b6f730ad743d2883a73cde9a65b2dd32cf25969284fae4
Contents?: true
Size: 691 Bytes
Versions: 5
Compression:
Stored size: 691 Bytes
Contents
module MnoEnterprise class Admin::InvoicesController < MnoEnterprise::Jpi::V1::Admin::BaseResourceController # GET /mnoe/invoices/201504-NU4 def show @invoice = MnoEnterprise::Invoice.where(slug: params[:id].upcase).reload.first respond_to do |format| if @invoice filename = "Invoice - #{@invoice.slug}.pdf" pdf_view = MnoEnterprise::InvoicePdf.new(@invoice).render format.html { send_data pdf_view, filename: filename, type: "application/pdf", disposition: 'inline' } else format.html { redirect_to root_path, alert: 'Sorry, the page requested could not be displayed' } end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems