Module: Authentication::InstanceMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/saasaparilla/authentication.rb', line 6

def self.included(base)
  base.before_filter :require_current_billable
end

Instance Method Details

#require_current_billableObject



11
12
13
14
15
16
# File 'lib/saasaparilla/authentication.rb', line 11

def require_current_billable
  if current_billable.nil?
    flash[:error] = "You must be logged in first."
    redirect_to '/'
  end
end