diff --git a/app/models/application_model.rb b/app/models/application_model.rb index 2d50b4eb4..0dfaf675a 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -305,9 +305,9 @@ returns lookup model from cache (if exists) or retrieve it from db, id, name or login possible - result = Model.lookup( :id => 123 ) - result = Model.lookup( :name => 'some name' ) - result = Model.lookup( :login => 'some login' ) + result = Model.lookup(id: 123) + result = Model.lookup(name: 'some name') + result = Model.lookup(login: 'some login') returns @@ -681,10 +681,10 @@ class OwnModel < ApplicationModel serve methode to configure and enable search index support for this model class Model < ApplicationModel - search_index_support :ignore_attributes => { - :create_article_type_id => true, - :create_article_sender_id => true, - :article_count => true, + search_index_support ignore_attributes: { + create_article_type_id: true, + create_article_sender_id: true, + article_count: true, } end @@ -748,7 +748,7 @@ reload search index with full data serve methode to configure and enable activity stream support for this model class Model < ApplicationModel - activity_stream_support :role => 'Admin' + activity_stream_support role: 'Admin' end =end @@ -835,7 +835,7 @@ class Model < ApplicationModel end class Model < ApplicationModel - history_support :ignore_attributes => { :article_count => true } + history_support ignore_attributes: { article_count: true } end =end @@ -1012,8 +1012,8 @@ return object and assets data = Model.full(123) data = { - :id => 123, - :assets => assets, + id: 123, + assets: assets, } =end diff --git a/app/models/application_model/search_index_base.rb b/app/models/application_model/search_index_base.rb index a657bd065..197f003d9 100644 --- a/app/models/application_model/search_index_base.rb +++ b/app/models/application_model/search_index_base.rb @@ -84,14 +84,6 @@ returns def search_index_attribute_lookup(attributes, ref_object) - # default keep attributes - keep_attributes = {} - if self.class.search_index_support_config[:keep_attributes] - self.class.search_index_support_config[:keep_attributes].each {|key, value| - keep_attributes[key] = value - } - end - attributes_new = {} attributes.each {|key, value| next if !value diff --git a/app/models/observer/ticket/notification/background_job.rb b/app/models/observer/ticket/notification/background_job.rb index abaa86a7b..5a61bb463 100644 --- a/app/models/observer/ticket/notification/background_job.rb +++ b/app/models/observer/ticket/notification/background_job.rb @@ -229,11 +229,10 @@ class Observer::Ticket::Notification::BackgroundJob def template_create(user, ticket, article, _ticket_changes) article_content = '' if article - article_content = '<snip> + article_content = 'i18n(Information):
#{article.body.text2html}
-</snip>

' end @@ -295,11 +294,10 @@ State: i18n(#{ticket.state.name.text2html})
} article_content = '' if article - article_content = '<snip> + article_content = 'i18n(Information):
#{article.body.text2html}
-</snip>

' end @@ -312,7 +310,7 @@ Ticket (#{ticket.title.text2html}) wurde von "#{ticket.updated_by.fullname.te
-Ă„nderungen:
+i18n(Changes):
' + changes + '

@@ -329,7 +327,7 @@ Ticket (#{ticket.title.text2html}) has been updated by "#{ticket.updated_by.f
-Changes:
+i18n(Changes):
' + changes + '

@@ -389,7 +387,7 @@ Changes:
def template_footer(_user, _ticket, _article) '

- i18n(View this directly here) + i18n(View this in Zammad)