From 3b6a101c5156521576220a78e249bf3b7ccf47d2 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 23 Sep 2013 09:04:16 +0200 Subject: [PATCH] Add also ticket to article assets. --- app/models/ticket/article/assets.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/models/ticket/article/assets.rb b/app/models/ticket/article/assets.rb index 5c0cee906..c46df3ee6 100644 --- a/app/models/ticket/article/assets.rb +++ b/app/models/ticket/article/assets.rb @@ -23,6 +23,14 @@ returns def assets (data) + if !data[ Ticket.to_app_model ] + data[ Ticket.to_app_model ] = {} + end + if !data[ Ticket.to_app_model ][ self.ticket_id ] + ticket = Ticket.find( self.ticket_id ) + data = ticket.assets(data) + end + if !data[ Ticket::Article.to_app_model ] data[ Ticket::Article.to_app_model ] = {} end