Class: Locomotive::Ecommerce::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Locomotive::Ecommerce::ApplicationController
show all
- Includes:
- EcommerceHelper
- Defined in:
- app/controllers/locomotive/ecommerce/application_controller.rb
Instance Method Summary
collapse
#as_currency, #current_user
included
#add_to_cart_path, #cart_path, #cart_update_path, #checkout_index_path, #checkout_path, #checkout_update_path, #confirm_order_path, #post_checkout_path, #purchases_path, #remove_from_cart_path
#current_user_cart
Instance Method Details
#authenticate_user! ⇒ Object
8
9
10
11
12
13
|
# File 'app/controllers/locomotive/ecommerce/application_controller.rb', line 8
def authenticate_user!
if current_user(self) == nil
flash[:error] = "Authentication needed. Please log in to continue."
redirect_to cart_path
end
end
|
#locomotive_user? ⇒ Boolean
15
16
17
|
# File 'app/controllers/locomotive/ecommerce/application_controller.rb', line 15
def locomotive_user?
locomotive_account_signed_in?
end
|