Class: Saasaparilla::InvoicesController

Inherits:
ApplicationController show all
Includes:
Authentication::InstanceMethods
Defined in:
app/controllers/saasaparilla/invoices_controller.rb

Instance Method Summary collapse

Methods included from Authentication::InstanceMethods

included, #require_current_billable

Instance Method Details

#get_invoiceObject



11
12
13
14
15
16
17
18
# File 'app/controllers/saasaparilla/invoices_controller.rb', line 11

def get_invoice
  @invoice = Invoice.find(params[:id])
  
  unless @invoice.billing_activity.subscription == current_billable.subscription
    flash[:error] = "Unauthorized to access this invoice"
    redirect_to subscription_path
  end
end

#showObject



6
7
8
# File 'app/controllers/saasaparilla/invoices_controller.rb', line 6

def show
  
end