Sha256: 6eeb98926576e1fbad4e64bb8b5a39c701a3c90a18c3fa36a41498624954ea2b

Contents?: true

Size: 438 Bytes

Versions: 5

Compression:

Stored size: 438 Bytes

Contents

class Saasaparilla::InvoicesController < ApplicationController
  
  unloadable
  include Authentication::InstanceMethods
  before_filter :get_invoice
  def show
    
  end
  
  
  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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
saasaparilla-0.2.2 app/controllers/saasaparilla/invoices_controller.rb
saasaparilla-0.2.1 app/controllers/saasaparilla/invoices_controller.rb
saasaparilla-0.1.8 app/controllers/saasaparilla/invoices_controller.rb
saasaparilla-0.1.7 app/controllers/saasaparilla/invoices_controller.rb
saasaparilla-0.1.6 app/controllers/saasaparilla/invoices_controller.rb