Skip to content

Instantly share code, notes, and snippets.

View pda's full-sized avatar
💾
Formatting…

Paul Annesley pda

💾
Formatting…
View GitHub Profile
require "bcrypt"
module GoTipping
class UserAuthenticator
def initialize(organisation, username, finder)
@organisation = organisation
@username = username
@finder = finder
end
class LineItem < ActiveRecord::Base
belongs_to :invoice
def allocated?
status == 'allocated'
end
def refundable?
allocated? && invoice.refundable?