Fixed Store/created_by_id handling.

This commit is contained in:
Martin Edenhofer 2013-04-20 12:06:39 +02:00
parent dfe8a89f53
commit 679e260cde
4 changed files with 24 additions and 20 deletions

View file

@ -40,7 +40,8 @@ class Observer::Ticket::Article::CommunicateEmail < ActiveRecord::Observer
:o_id => record.id, :o_id => record.id,
:data => message.to_s, :data => message.to_s,
:filename => "ticket-#{ticket.number}-#{record.id}.eml", :filename => "ticket-#{ticket.number}-#{record.id}.eml",
:preferences => {} :preferences => {},
:created_by_id => record.created_by_id,
) )
# add history record # add history record

View file

@ -221,6 +221,7 @@ class Package < ApplicationModel
:data => package.to_s, :data => package.to_s,
:filename => meta[:name] + '-' + meta[:version] + '.zpm', :filename => meta[:name] + '-' + meta[:version] + '.zpm',
:preferences => {}, :preferences => {},
:created_by_id => UserInfo.current_user_id || 1,
) )
end end

View file

@ -22,7 +22,8 @@ class Ticket::Article < ApplicationModel
:o_id => self.id, :o_id => self.id,
:data => attachment.store_file.data, :data => attachment.store_file.data,
:filename => attachment.filename, :filename => attachment.filename,
:preferences => attachment.preferences :preferences => attachment.preferences,
:created_by_id => self.created_by_id,
) )
end end
self.attachments = article_store self.attachments = article_store

View file

@ -29,7 +29,8 @@ class StoreTest < ActiveSupport::TestCase
:o_id => 1, :o_id => 1,
:data => file[:data], :data => file[:data],
:filename => file[:filename], :filename => file[:filename],
:preferences => {} :preferences => {},
:created_by_id => 1,
) )
assert store assert store