Class: Auth::Work::WorkController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/auth/work/work_controller.rb

Direct Known Subclasses

InstructionsController

Instance Method Summary collapse

Instance Method Details

#instantiate_bullet_classObject



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_instruction_classObject



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_classObject



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_classesObject



41
42
43
44
45
# File 'app/controllers/auth/work/work_controller.rb', line 41

def instantiate_work_classes
  instantiate_instruction_class
  instantiate_bullet_class
  instantiate_product_class
end