Fix passign full user object instead of id to Event.create

This commit is contained in:
Dmitriy Zaporozhets 2013-08-14 16:02:21 +03:00
parent 6579ba3e77
commit 7d1b3d4e27
3 changed files with 2 additions and 3 deletions

View file

@ -33,7 +33,7 @@ class ActivityObserver < BaseObserver
target_id: record.id, target_id: record.id,
target_type: record.class.name, target_type: record.class.name,
action: status, action: status,
author_id: current_user author_id: current_user.id
) )
end end
end end

View file

@ -46,7 +46,7 @@ class MergeRequestObserver < ActivityObserver
target_id: record.id, target_id: record.id,
target_type: record.class.name, target_type: record.class.name,
action: status, action: status,
author_id: current_user author_id: current_user.id
) )
end end
end end

View file

@ -8,7 +8,6 @@ describe ActivityObserver do
it { @event.project.should == project } it { @event.project.should == project }
end end
describe "Issue created" do describe "Issue created" do
before do before do
Issue.observers.enable :activity_observer do Issue.observers.enable :activity_observer do