Class: Account::ApplicationController

Inherits:
Tang::ApplicationController show all
Defined in:
app/controllers/tang/account/application_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_customerObject (readonly)

Returns the value of attribute current_customer.



10
11
12
# File 'app/controllers/tang/account/application_controller.rb', line 10

def current_customer
  @current_customer
end

Instance Method Details

#ensure_customerObject



5
6
7
8
# File 'app/controllers/tang/account/application_controller.rb', line 5

def ensure_customer
  authenticate_user! if respond_to?(:authenticate_user!)
  @current_customer = current_user
end