From 731186840497673dfa5c911e9710de655e066d26 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 17 Oct 2014 14:15:54 +0200 Subject: [PATCH] Fixed rails 'reload' + 'include'/'extend' + 'require' issue with using 'load' instead. --- app/models/history.rb | 2 +- app/models/organization.rb | 2 +- app/models/ticket.rb | 8 ++++---- app/models/ticket/article.rb | 6 +++--- app/models/user.rb | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/models/history.rb b/app/models/history.rb index 578f1c457..aa16b9857 100644 --- a/app/models/history.rb +++ b/app/models/history.rb @@ -1,7 +1,7 @@ # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/ class History < ApplicationModel - require 'history/assets' + load 'history/assets.rb' include History::Assets self.table_name = 'histories' diff --git a/app/models/organization.rb b/app/models/organization.rb index b15d33540..dcf58eb6e 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -1,7 +1,7 @@ # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/ class Organization < ApplicationModel - require 'organization/assets' + load 'organization/assets.rb' include Organization::Assets extend Organization::Search include Organization::SearchIndex diff --git a/app/models/ticket.rb b/app/models/ticket.rb index 58178f0df..01bbdc853 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -4,13 +4,13 @@ class Ticket < ApplicationModel include Ticket::Escalation include Ticket::Subject include Ticket::Permission - require 'ticket/assets' + load 'ticket/assets.rb' include Ticket::Assets - require 'ticket/history_log' + load 'ticket/history_log.rb' include Ticket::HistoryLog - require 'ticket/activity_stream_log' + load 'ticket/activity_stream_log.rb' include Ticket::ActivityStreamLog - require 'ticket/search_index' + load 'ticket/search_index.rb' include Ticket::SearchIndex extend Ticket::Search diff --git a/app/models/ticket/article.rb b/app/models/ticket/article.rb index 83180c460..ee55a33d6 100644 --- a/app/models/ticket/article.rb +++ b/app/models/ticket/article.rb @@ -1,11 +1,11 @@ # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/ class Ticket::Article < ApplicationModel - require 'ticket/article/assets' + load 'ticket/article/assets.rb' include Ticket::Article::Assets - require 'ticket/article/history_log' + load 'ticket/article/history_log.rb' include Ticket::Article::HistoryLog - require 'ticket/article/activity_stream_log' + load 'ticket/article/activity_stream_log.rb' include Ticket::Article::ActivityStreamLog belongs_to :ticket diff --git a/app/models/user.rb b/app/models/user.rb index 2fe4086f8..ce89b4782 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,7 +3,7 @@ require 'digest/md5' class User < ApplicationModel - require 'user/assets' + load 'user/assets.rb' include User::Assets extend User::Search include User::SearchIndex