Class: Saasaparilla::InvoicesController
Instance Method Summary
collapse
included, #require_current_billable
Instance Method Details
#get_invoice ⇒ Object
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
|
#show ⇒ Object
6
7
8
|
# File 'app/controllers/saasaparilla/invoices_controller.rb', line 6
def show
end
|