Some new rubocop checks.
This commit is contained in:
parent
5b98be93e1
commit
a2d49cefc5
26 changed files with 1178 additions and 1138 deletions
|
@ -31,12 +31,11 @@ returns
|
||||||
|
|
||||||
return data if !self['created_by_id'] && !self['updated_by_id']
|
return data if !self['created_by_id'] && !self['updated_by_id']
|
||||||
['created_by_id', 'updated_by_id'].each {|item|
|
['created_by_id', 'updated_by_id'].each {|item|
|
||||||
if self[ item ]
|
next if !self[ item ]
|
||||||
if !data[ User.to_app_model ] || !data[ User.to_app_model ][ self[ item ] ]
|
if !data[ User.to_app_model ] || !data[ User.to_app_model ][ self[ item ] ]
|
||||||
user = User.lookup( id: self[ item ] )
|
user = User.lookup( id: self[ item ] )
|
||||||
data = user.assets( data )
|
data = user.assets( data )
|
||||||
end
|
end
|
||||||
end
|
|
||||||
}
|
}
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,6 @@ class Locale < ApplicationModel
|
||||||
raise "Can't load locales from #{url}: #{result.error}" if !result.success?
|
raise "Can't load locales from #{url}: #{result.error}" if !result.success?
|
||||||
|
|
||||||
result.data.each {|locale|
|
result.data.each {|locale|
|
||||||
puts locale.inspect
|
|
||||||
exists = Locale.where(locale: locale['locale']).first
|
exists = Locale.where(locale: locale['locale']).first
|
||||||
if exists
|
if exists
|
||||||
exists.update(locale.symbolize_keys!)
|
exists.update(locale.symbolize_keys!)
|
||||||
|
|
|
@ -40,12 +40,11 @@ returns
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
['created_by_id', 'updated_by_id'].each {|item|
|
['created_by_id', 'updated_by_id'].each {|item|
|
||||||
if self[ item ]
|
next if !self[ item ]
|
||||||
if !data[ User.to_app_model ][ self[ item ] ]
|
if !data[ User.to_app_model ][ self[ item ] ]
|
||||||
user = User.lookup( id: self[ item ] )
|
user = User.lookup( id: self[ item ] )
|
||||||
data = user.assets( data )
|
data = user.assets( data )
|
||||||
end
|
end
|
||||||
end
|
|
||||||
}
|
}
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::ActivityStreamLog
|
class Ticket
|
||||||
|
module ActivityStreamLog
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -35,5 +36,5 @@ returns
|
||||||
created_by_id: user_id,
|
created_by_id: user_id,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class Ticket::Article < ApplicationModel
|
class Ticket
|
||||||
|
class Article < ApplicationModel
|
||||||
load 'ticket/article/assets.rb'
|
load 'ticket/article/assets.rb'
|
||||||
include Ticket::Article::Assets
|
include Ticket::Article::Assets
|
||||||
load 'ticket/article/history_log.rb'
|
load 'ticket/article/history_log.rb'
|
||||||
|
@ -48,3 +49,4 @@ class Ticket::Article < ApplicationModel
|
||||||
latest_change_support
|
latest_change_support
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Article::ActivityStreamLog
|
class Ticket
|
||||||
|
class Article
|
||||||
|
module ActivityStreamLog
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -36,5 +38,6 @@ returns
|
||||||
created_by_id: user_id,
|
created_by_id: user_id,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Article::Assets
|
class Ticket
|
||||||
|
class Article
|
||||||
|
module Assets
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -42,14 +44,14 @@ returns
|
||||||
end
|
end
|
||||||
|
|
||||||
['created_by_id', 'updated_by_id'].each {|item|
|
['created_by_id', 'updated_by_id'].each {|item|
|
||||||
if self[ item ]
|
next if !self[ item ]
|
||||||
if !data[ User.to_app_model ] || !data[ User.to_app_model ][ self[ item ] ]
|
if !data[ User.to_app_model ] || !data[ User.to_app_model ][ self[ item ] ]
|
||||||
user = User.lookup( id: self[ item ] )
|
user = User.lookup( id: self[ item ] )
|
||||||
data = user.assets( data )
|
data = user.assets( data )
|
||||||
end
|
end
|
||||||
end
|
|
||||||
}
|
}
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Article::HistoryLog
|
class Ticket
|
||||||
|
class Article
|
||||||
|
module HistoryLog
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -27,5 +29,6 @@ returns
|
||||||
data[:created_by_id] = user_id
|
data[:created_by_id] = user_id
|
||||||
History.add(data)
|
History.add(data)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Assets
|
class Ticket
|
||||||
|
module Assets
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -30,14 +31,13 @@ returns
|
||||||
data[ Ticket.to_app_model ][ self.id ] = self.attributes_with_associations
|
data[ Ticket.to_app_model ][ self.id ] = self.attributes_with_associations
|
||||||
end
|
end
|
||||||
['created_by_id', 'updated_by_id', 'owner_id', 'customer_id'].each {|item|
|
['created_by_id', 'updated_by_id', 'owner_id', 'customer_id'].each {|item|
|
||||||
if self[ item ]
|
next if !self[ item ]
|
||||||
if !data[ User.to_app_model ] || !data[ User.to_app_model ][ self[ item ] ]
|
if !data[ User.to_app_model ] || !data[ User.to_app_model ][ self[ item ] ]
|
||||||
user = User.lookup( id: self[ item ] )
|
user = User.lookup( id: self[ item ] )
|
||||||
data = user.assets( data )
|
data = user.assets( data )
|
||||||
end
|
end
|
||||||
end
|
|
||||||
}
|
}
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class Ticket::Counter < ApplicationModel
|
class Ticket
|
||||||
|
class Counter < ApplicationModel
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Escalation
|
class Ticket
|
||||||
|
module Escalation
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -321,3 +322,4 @@ returns
|
||||||
return escalation_time
|
return escalation_time
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class Ticket::Flag < ApplicationModel
|
class Ticket
|
||||||
|
class Flag < ApplicationModel
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::HistoryLog
|
class Ticket
|
||||||
|
module HistoryLog
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -77,5 +78,5 @@ returns
|
||||||
assets: assets,
|
assets: assets,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class Ticket::Number
|
class Ticket
|
||||||
|
class Number
|
||||||
include ApplicationLib
|
include ApplicationLib
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
@ -56,3 +57,4 @@ returns
|
||||||
adapter
|
adapter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Number::Date
|
class Ticket
|
||||||
|
class Number
|
||||||
|
module Date
|
||||||
extend self
|
extend self
|
||||||
|
|
||||||
def generate
|
def generate
|
||||||
|
@ -8,7 +10,7 @@ module Ticket::Number::Date
|
||||||
# get config
|
# get config
|
||||||
config = Setting.get('ticket_number_date')
|
config = Setting.get('ticket_number_date')
|
||||||
|
|
||||||
t = Time.now
|
t = Time.zone.now
|
||||||
date = t.strftime('%Y-%m-%d')
|
date = t.strftime('%Y-%m-%d')
|
||||||
|
|
||||||
# read counter
|
# read counter
|
||||||
|
@ -64,6 +66,7 @@ module Ticket::Number::Date
|
||||||
end
|
end
|
||||||
number
|
number
|
||||||
end
|
end
|
||||||
|
|
||||||
def check(string)
|
def check(string)
|
||||||
|
|
||||||
# get config
|
# get config
|
||||||
|
@ -73,11 +76,13 @@ module Ticket::Number::Date
|
||||||
ticket = nil
|
ticket = nil
|
||||||
|
|
||||||
# probe format
|
# probe format
|
||||||
if string =~ /#{ticket_hook}#{ticket_hook_divider}(#{system_id}\d{2,50})/i then
|
if string =~ /#{ticket_hook}#{ticket_hook_divider}(#{system_id}\d{2,50})/i
|
||||||
ticket = Ticket.where( number: $1 ).first
|
ticket = Ticket.where( number: $1 ).first
|
||||||
elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,50})/i then
|
elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,50})/i
|
||||||
ticket = Ticket.where( number: $1 ).first
|
ticket = Ticket.where( number: $1 ).first
|
||||||
end
|
end
|
||||||
ticket
|
ticket
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Number::Increment
|
class Ticket
|
||||||
|
class Number
|
||||||
|
module Increment
|
||||||
extend self
|
extend self
|
||||||
|
|
||||||
def generate
|
def generate
|
||||||
|
@ -77,11 +79,13 @@ module Ticket::Number::Increment
|
||||||
ticket = nil
|
ticket = nil
|
||||||
|
|
||||||
# probe format
|
# probe format
|
||||||
if string =~ /#{ticket_hook}#{ticket_hook_divider}(#{system_id}\d{2,48})/i then
|
if string =~ /#{ticket_hook}#{ticket_hook_divider}(#{system_id}\d{2,48})/i
|
||||||
ticket = Ticket.where( number: $1 ).first
|
ticket = Ticket.where( number: $1 ).first
|
||||||
elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,48})/i then
|
elsif string =~ /#{ticket_hook}\s{0,2}(#{system_id}\d{2,48})/i
|
||||||
ticket = Ticket.where( number: $1 ).first
|
ticket = Ticket.where( number: $1 ).first
|
||||||
end
|
end
|
||||||
ticket
|
ticket
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Overviews
|
class Ticket
|
||||||
|
module Overviews
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -189,6 +190,7 @@ returns
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def self._condition(condition)
|
def self._condition(condition)
|
||||||
sql = ''
|
sql = ''
|
||||||
bind = [nil]
|
bind = [nil]
|
||||||
|
@ -248,3 +250,4 @@ returns
|
||||||
bind
|
bind
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Permission
|
class Ticket
|
||||||
|
module Permission
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -43,5 +44,5 @@ returns
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class Ticket::Priority < ApplicationModel
|
class Ticket
|
||||||
|
class Priority < ApplicationModel
|
||||||
self.table_name = 'ticket_priorities'
|
self.table_name = 'ticket_priorities'
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::ScreenOptions
|
class Ticket
|
||||||
|
module ScreenOptions
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -173,5 +174,5 @@ returns
|
||||||
assets: assets,
|
assets: assets,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Search
|
class Ticket
|
||||||
|
module Search
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -63,9 +64,9 @@ returns
|
||||||
query_extention['bool']['must'] = []
|
query_extention['bool']['must'] = []
|
||||||
|
|
||||||
if current_user.is_role('Agent')
|
if current_user.is_role('Agent')
|
||||||
groups = Group.joins(:users).
|
groups = Group.joins(:users)
|
||||||
where( 'groups_users.user_id = ?', current_user.id ).
|
.where( 'groups_users.user_id = ?', current_user.id )
|
||||||
where( 'groups.active = ?', true )
|
.where( 'groups.active = ?', true )
|
||||||
group_condition = []
|
group_condition = []
|
||||||
groups.each {|group|
|
groups.each {|group|
|
||||||
group_condition.push group.name
|
group_condition.push group.name
|
||||||
|
@ -113,18 +114,18 @@ returns
|
||||||
# - stip out * we already search for *query* -
|
# - stip out * we already search for *query* -
|
||||||
if query
|
if query
|
||||||
query.gsub! '*', ''
|
query.gsub! '*', ''
|
||||||
tickets_all = Ticket.select('DISTINCT(tickets.id)').
|
tickets_all = Ticket.select('DISTINCT(tickets.id)')
|
||||||
where(access_condition).
|
.where(access_condition)
|
||||||
where( '( `tickets`.`title` LIKE ? OR `tickets`.`number` LIKE ? OR `ticket_articles`.`body` LIKE ? OR `ticket_articles`.`from` LIKE ? OR `ticket_articles`.`to` LIKE ? OR `ticket_articles`.`subject` LIKE ?)', "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%" ).
|
.where( '( `tickets`.`title` LIKE ? OR `tickets`.`number` LIKE ? OR `ticket_articles`.`body` LIKE ? OR `ticket_articles`.`from` LIKE ? OR `ticket_articles`.`to` LIKE ? OR `ticket_articles`.`subject` LIKE ?)', "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%" )
|
||||||
joins(:articles).
|
.joins(:articles)
|
||||||
order('`tickets`.`created_at` DESC').
|
.order('`tickets`.`created_at` DESC')
|
||||||
limit(limit)
|
.limit(limit)
|
||||||
else
|
else
|
||||||
tickets_all = Ticket.select('DISTINCT(tickets.id)').
|
tickets_all = Ticket.select('DISTINCT(tickets.id)')
|
||||||
where(access_condition).
|
.where(access_condition)
|
||||||
where(params[:condition]).
|
.where(params[:condition])
|
||||||
order('`tickets`.`created_at` DESC').
|
.order('`tickets`.`created_at` DESC')
|
||||||
limit(limit)
|
.limit(limit)
|
||||||
end
|
end
|
||||||
|
|
||||||
# build result list
|
# build result list
|
||||||
|
@ -142,5 +143,5 @@ returns
|
||||||
}
|
}
|
||||||
tickets
|
tickets
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::SearchIndex
|
class Ticket
|
||||||
|
module SearchIndex
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -105,5 +106,5 @@ returns
|
||||||
return if !attributes
|
return if !attributes
|
||||||
SearchIndexBackend.add(self.class.to_s, attributes)
|
SearchIndexBackend.add(self.class.to_s, attributes)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class Ticket::State < ApplicationModel
|
class Ticket
|
||||||
|
class State < ApplicationModel
|
||||||
belongs_to :state_type, class_name: 'Ticket::StateType'
|
belongs_to :state_type, class_name: 'Ticket::StateType'
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
|
|
||||||
|
@ -51,3 +52,4 @@ returns:
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class Ticket::StateType < ApplicationModel
|
class Ticket
|
||||||
|
class StateType < ApplicationModel
|
||||||
has_many :states, class_name: 'Ticket::State'
|
has_many :states, class_name: 'Ticket::State'
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
latest_change_support
|
latest_change_support
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
module Ticket::Subject
|
class Ticket
|
||||||
|
module Subject
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
@ -76,3 +77,4 @@ returns
|
||||||
subject
|
subject
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -75,12 +75,11 @@ returns
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
['created_by_id', 'updated_by_id'].each {|item|
|
['created_by_id', 'updated_by_id'].each {|item|
|
||||||
if self[ item ]
|
next if !self[ item ]
|
||||||
if !data[ User.to_app_model ][ self[ item ] ]
|
if !data[ User.to_app_model ][ self[ item ] ]
|
||||||
user = User.lookup( id: self[ item ] )
|
user = User.lookup( id: self[ item ] )
|
||||||
data = user.assets( data )
|
data = user.assets( data )
|
||||||
end
|
end
|
||||||
end
|
|
||||||
}
|
}
|
||||||
data
|
data
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue