Class: Auth::Work::WorkController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Auth::Work::WorkController
show all
- Defined in:
- app/controllers/auth/work/work_controller.rb
Instance Method Summary
collapse
Instance Method Details
#instantiate_bullet_class ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
|
# File 'app/controllers/auth/work/work_controller.rb', line 14
def instantiate_bullet_class
if @auth_work_bullet_class = Auth.configuration.bullet_class
begin
@auth_work_bullet_class = @auth_work_bullet_class.constantize
rescue
not_found("error instantiating class from bullet class")
end
else
not_found("bullet class not specified in configuration")
end
end
|
#instantiate_communication_class ⇒ Object
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'app/controllers/auth/work/work_controller.rb', line 41
def instantiate_communication_class
if @auth_work_communication_class = Auth.configuration.communication_class
begin
@auth_work_communication_class = @auth_work_communication_class.constantize
rescue => e
puts e.to_s
not_found("error instatiating class from communication class")
end
else
not_found("communication class not specified in configuration")
end
end
|
#instantiate_cycle_class ⇒ Object
67
68
69
70
71
72
73
74
75
76
77
78
|
# File 'app/controllers/auth/work/work_controller.rb', line 67
def instantiate_cycle_class
if @auth_work_cycle_class = Auth.configuration.cycle_class
begin
@auth_work_cycle_class = @auth_work_cycle_class.constantize
rescue => e
puts e.to_s
not_found("error instatiating class from cycle class")
end
else
not_found("cycle class not specified in configuration")
end
end
|
#instantiate_instruction_class ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
|
# File 'app/controllers/auth/work/work_controller.rb', line 2
def instantiate_instruction_class
if @auth_work_instruction_class = Auth.configuration.instruction_class
begin
@auth_work_instruction_class = @auth_work_instruction_class.constantize
rescue
not_found("error instantiating class from instruction class")
end
else
not_found("instruction class not specified in configuration")
end
end
|
#instantiate_product_class ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'app/controllers/auth/work/work_controller.rb', line 26
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
|
#instantiate_work_classes ⇒ Object
do we have a cycle class / controller, obviously are going to need this eventually. so let me now add that to the engine, add cycle class to engine.
82
83
84
85
86
87
88
|
# File 'app/controllers/auth/work/work_controller.rb', line 82
def instantiate_work_classes
instantiate_instruction_class
instantiate_bullet_class
instantiate_product_class
instantiate_cycle_class
instantiate_communication_class
end
|