app/controllers/auth/work/work_controller.rb in wordjelly-auth-1.1.7 vs app/controllers/auth/work/work_controller.rb in wordjelly-auth-1.1.8
- old
+ new
@@ -36,11 +36,54 @@
not_found("product class not specified in configuration")
end
end
+ 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
+
+ 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
+
+ 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
+ ## 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.
+
def instantiate_work_classes
instantiate_instruction_class
instantiate_bullet_class
instantiate_product_class
+ instantiate_cycle_class
+ instantiate_communication_class
end
end
\ No newline at end of file