Martin Edenhofer 11 лет назад
Родитель
Сommit
0ed5cbe741
5 измененных файлов с 2 добавлено и 15 удалено
  1. 0 4
      app/models/application_model.rb
  2. 0 2
      app/models/sla.rb
  3. 0 3
      app/models/ticket.rb
  4. 0 4
      app/models/user.rb
  5. 2 2
      config/application.rb

+ 0 - 4
app/models/application_model.rb

@@ -1,9 +1,5 @@
 # Copyright (C) 2013-2013 Zammad Foundation, http://zammad-foundation.org/
 
-require 'cache'
-require 'user_info'
-require 'sessions'
-
 class ApplicationModel < ActiveRecord::Base
   self.abstract_class = true
 

+ 0 - 2
app/models/sla.rb

@@ -1,7 +1,5 @@
 # Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
 
-require 'cache'
-
 class Sla < ApplicationModel
   store     :condition
   store     :data

+ 0 - 3
app/models/ticket.rb

@@ -1,8 +1,5 @@
 # Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
 
-require 'time_calculation'
-require 'sla'
-
 class Ticket < ApplicationModel
   before_create   :check_generate, :check_defaults
   before_update   :check_defaults

+ 0 - 4
app/models/user.rb

@@ -1,9 +1,5 @@
 # Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
 
-require 'sso'
-require 'digest/sha2'
-require 'organization'
-
 class User < ApplicationModel
   include User::Assets
   extend User::Search

+ 2 - 2
config/application.rb

@@ -16,7 +16,7 @@ module Zammad
     # -- all .rb files in that directory are automatically loaded.
 
     # Custom directories with classes and modules you want to be autoloadable.
-    config.autoload_paths += Dir["#{config.root}/lib/**/"]
+    config.autoload_paths += Dir["#{config.root}/lib/*", "#{config.root}/lib/**/"]
 #    config.autoload_paths += %W(#{config.root}/lib)
 
     # Only load the plugins named here, in the order given (default is alphabetical).
@@ -74,4 +74,4 @@ module Zammad
     config.api_path = '/api/v1'
 
   end
-end
+end