Class: Auth::Shopping::ShoppingController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Auth::Shopping::ShoppingController
show all
- Defined in:
- app/controllers/auth/shopping/shopping_controller.rb
Instance Method Summary
collapse
Instance Method Details
#instantiate_cart_class ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
|
# File 'app/controllers/auth/shopping/shopping_controller.rb', line 17
def instantiate_cart_class
if @auth_shopping_cart_class = Auth.configuration.cart_class
begin
@auth_shopping_cart_class = @auth_shopping_cart_class.constantize
rescue
not_found("error instantiating class from cart class")
end
else
not_found("cart class not specified in configuration")
end
end
|
#instantiate_cart_item_class ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'app/controllers/auth/shopping/shopping_controller.rb', line 30
def instantiate_cart_item_class
if @auth_shopping_cart_item_class = Auth.configuration.cart_item_class
begin
@auth_shopping_cart_item_class = @auth_shopping_cart_item_class.constantize
rescue
not_found("error instatiating class from cart item class")
end
else
not_found("cart item class not specified in configuration")
end
end
|
#instantiate_discount_class ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
|
# File 'app/controllers/auth/shopping/shopping_controller.rb', line 4
def instantiate_discount_class
if @auth_shopping_discount_class = Auth.configuration.discount_class
begin
@auth_shopping_discount_class = @auth_shopping_discount_class.constantize
rescue
not_found("error instantiating class from discount class")
end
else
not_found("discount class not specified in configuration")
end
end
|
#instantiate_payment_class ⇒ Object
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'app/controllers/auth/shopping/shopping_controller.rb', line 45
def instantiate_payment_class
if @auth_shopping_payment_class = Auth.configuration.payment_class
begin
@auth_shopping_payment_class = @auth_shopping_payment_class.constantize
rescue
not_found("error instatiating class from payment class")
end
else
not_found("payment class not specified in configuration")
end
end
|
#instantiate_product_class ⇒ Object
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# File 'app/controllers/auth/shopping/shopping_controller.rb', line 59
def instantiate_product_class
if @auth_shopping_product_class = Auth.configuration.product_class
begin
@auth_shopping_product_class = @auth_shopping_product_class.constantize
rescue => e
puts e.to_s
not_found("error instatiating class from product class")
end
else
not_found("product class not specified in configuration")
end
end
|
77
78
79
80
81
82
83
|
# File 'app/controllers/auth/shopping/shopping_controller.rb', line 77
def instantiate_shopping_classes
instantiate_payment_class
instantiate_cart_class
instantiate_cart_item_class
instantiate_product_class
instantiate_discount_class
end
|